Skip to content

Commit

Permalink
Merge pull request #3992 from novuhq/fix-ci-action-run-backend
Browse files Browse the repository at this point in the history
fix(ci): proper settings for secrets for run backend
  • Loading branch information
Pablo Fernández authored Aug 17, 2023
2 parents 83d2c56 + 5805c06 commit 5a4162a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
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 }}
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

0 comments on commit 5a4162a

Please sign in to comment.