Skip to content

Commit

Permalink
chore: add short lived cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
dolcalmi committed Oct 23, 2024
1 parent 2b662e5 commit a446c90
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/e2e-test2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ jobs:
fail-fast: false

steps:
- id: vars
run: echo "short_sha=${GITHUB_SHA:0:7}" >> $GITHUB_ENV

- uses: actions/checkout@v4

- name: Install Nix
Expand All @@ -53,7 +56,8 @@ jobs:
target
.buckd
buck-out/cache
key: buck2-${{ runner.os }}-${{ matrix.target }}
key: b2-${{ matrix.target }}-${{ env.short_sha }}
enableCrossOsArchive: true

tests:
name: execute via bats
Expand All @@ -62,6 +66,9 @@ jobs:
needs: build

steps:
- id: vars
run: echo "short_sha=${GITHUB_SHA:0:7}" >> $GITHUB_ENV

- uses: actions/checkout@v4

- name: Install Nix
Expand All @@ -81,7 +88,25 @@ jobs:
target
.buckd
buck-out/cache
key: buck2-${{ runner.os }}-
key: |
b2-//core/api-${{ env.short_sha }}
b2-//core/api-ws-server-${{ env.short_sha }}
b2-//core/api-trigger-${{ env.short_sha }}
b2-//core/api-exporter-${{ env.short_sha }}
b2-//apps/dashboard-${{ env.short_sha }}
b2-//apps/consent-${{ env.short_sha }}
b2-//apps/pay-${{ env.short_sha }}
b2-//apps/admin-panel-${{ env.short_sha }}
b2-//apps/map-${{ env.short_sha }}
b2-//apps/voucher-${{ env.short_sha }}
b2-//core/api-keys-${{ env.short_sha }}
b2-//core/notifications-${{ env.short_sha }}
b2-//bats/helpers/callback:run-${{ env.short_sha }}
b2-//bats/helpers/subscriber:run-${{ env.short_sha }}
b2-//bats/helpers/totp:generate-${{ env.short_sha }}
restore-keys: |
buck2-${{ runner.os }}-
fail-on-cache-miss: true

- name: Run bats tests
run: |
Expand Down

0 comments on commit a446c90

Please sign in to comment.