Skip to content

Commit

Permalink
Change how we generate build ids
Browse files Browse the repository at this point in the history
  • Loading branch information
mika-robots committed Oct 12, 2023
1 parent 5b97466 commit 4008650
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/cypress_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ on:
- e2e_test_mika

jobs:
# single job that generates and outputs a common id
prepare:
runs-on: ubuntu-20.04
outputs:
uuid: ${{ steps.uuid.outputs.value }}
steps:
- name: Generate unique ID 💎
id: uuid
# take the current commit + timestamp together
# the typical value would be something like
# "sha-5d3fe...35d3-time-1620841214"
run: echo "value=sha-$GITHUB_SHA-time-$(date +"%s")" >> $GITHUB_OUTPUT
build:
runs-on: ubuntu-20.04
timeout-minutes: 30
Expand Down Expand Up @@ -69,7 +81,6 @@ jobs:
NODE_ENV: development
VITE_API_URL: http://localhost:5000
CYPRESS_COVERAGE: true

- name: Run E2E test (English)
env:
CYPRESS_RECORD_KEY: ${{secrets.CYPRESS_RECORD_KEY}}
Expand All @@ -82,6 +93,7 @@ jobs:
record: true
parallel: false
group: "UI - Chrome"
ci-build-id: ${{ needs.prepare.outputs.uuid }}

- name: Archive backend logs
uses: actions/upload-artifact@v3
Expand All @@ -98,8 +110,7 @@ jobs:
- name: Set code coverage commit status
continue-on-error: true
working-directory: packages/end-to-end
run: npx set-gh-status -t ${{secrets.GITHUB_TOKEN}}
run: npx set-gh-status -m "Update coverage badge"
env:
SET_STATUS_TOKEN: ${{secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GH_SHA: ${{ github.event.after }}

0 comments on commit 4008650

Please sign in to comment.