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 92b4711
Showing 1 changed file with 34 additions and 2 deletions.
36 changes: 34 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,16 @@ jobs:
needs: build

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

- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 15360
temp-reserve-mb: 12288
remove-dotnet: "true"

- uses: actions/checkout@v4

- name: Install Nix
Expand All @@ -81,7 +95,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: |
b2-
fail-on-cache-miss: true

- name: Run bats tests
run: |
Expand Down

0 comments on commit 92b4711

Please sign in to comment.