Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): proper settings for secrets for run backend #3992

Merged
merged 1 commit into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/actions/run-backend/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ inputs:
description: 'The Launch Darkly SDK key to use'
required: false
default: ''
cypress_github_oauth_client_id:
description: 'Cypress GitHub client ID'
required: true
cypress_github_oauth_client_secret:
description: 'Cypress GitHub client secret'
required: true

runs:
using: composite
Expand All @@ -15,8 +21,8 @@ runs:
- name: Start API in TEST
shell: bash
env:
GITHUB_OAUTH_CLIENT_ID: ${{ secrets.CYPRESS_GITHUB_OAUTH_CLIENT_ID }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Secrets is not injected in the actions.

GITHUB_OAUTH_CLIENT_SECRET: ${{ secrets.CYPRESS_GITHUB_OAUTH_CLIENT_SECRET }}
GITHUB_OAUTH_CLIENT_ID: ${{ inputs.cypress_github_oauth_client_id }}
GITHUB_OAUTH_CLIENT_SECRET: ${{ inputs.cypress_github_oauth_client_secret }}
NODE_ENV: "test"
PORT: "1336"
TZ: "UTC"
Expand All @@ -26,6 +32,7 @@ runs:
run: cd apps/api && pnpm start:build &

- name: Start Worker
shell: bash
env:
NODE_ENV: "test"
PORT: "1342"
Expand All @@ -35,4 +42,5 @@ runs:
run: cd apps/worker && pnpm start:prod &

- name: Wait on API and Worker
shell: bash
run: wait-on --timeout=180000 http://localhost:1336/v1/health-check http://localhost:1342/v1/health-check
2 changes: 2 additions & 0 deletions .github/workflows/reusable-web-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ jobs:

- uses: ./.github/actions/run-backend
with:
cypress_github_oauth_client_id: ${{ secrets.CYPRESS_GITHUB_OAUTH_CLIENT_ID }}
cypress_github_oauth_client_secret: ${{ secrets.CYPRESS_GITHUB_OAUTH_CLIENT_SECRET }}
launch_darkly_sdk_key: ${{ secrets.LAUNCH_DARKLY_SDK_KEY }}

- name: Start Client
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/reusable-widget-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ jobs:

- uses: ./.github/actions/run-backend
with:
cypress_github_oauth_client_id: ${{ secrets.CYPRESS_GITHUB_OAUTH_CLIENT_ID }}
cypress_github_oauth_client_secret: ${{ secrets.CYPRESS_GITHUB_OAUTH_CLIENT_SECRET }}
launch_darkly_sdk_key: ${{ secrets.LAUNCH_DARKLY_SDK_KEY }}

# Runs a single command using the runners shell
Expand Down