Skip to content

Commit

Permalink
add run_attempt to e2e fixture cache key (#1241)
Browse files Browse the repository at this point in the history
* add run_attempt to e2e fixture cache key

* run workflow when workflow file is changed

* define fixture cache key in env
  • Loading branch information
codemonkey800 committed Sep 1, 2023
1 parent 62f11bd commit 65a787d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,22 @@ on:
branches:
- main
paths:
- .github/workflows/e2e-tests.yml
- 'frontend/**'
pull_request:
branches:
- '**'
paths:
- .github/workflows/e2e-tests.yml
- 'frontend/**'

defaults:
run:
working-directory: frontend/

env:
FIXTURES_CACHE_KEY: e2e-fixtures-${{ github.run_id }}-${{ github.run_attempt }}

jobs:
e2e-setup:
name: E2E Setup
Expand Down Expand Up @@ -79,7 +84,7 @@ jobs:
uses: actions/cache@v3
with:
path: frontend/e2e/fixtures
key: e2e-fixtures-${{ github.run_id }}
key: ${{ env.FIXTURES_CACHE_KEY }}

- name: Fetch fixture data
env:
Expand Down Expand Up @@ -152,7 +157,7 @@ jobs:
uses: actions/cache@v3
with:
path: frontend/e2e/fixtures
key: e2e-fixtures-${{ github.run_id }}
key: ${{ env.FIXTURES_CACHE_KEY }}

- name: Run E2E Tests
env:
Expand Down

0 comments on commit 65a787d

Please sign in to comment.