Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto env vars + Ignore Failures mode + end2end test #7

Merged
merged 21 commits into from
Jul 8, 2024
Prev Previous commit
fix
be9 committed Jul 8, 2024
commit 50f9d5e1e71230cb452369089ea807103bfebb81
17 changes: 9 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -64,6 +64,7 @@ jobs:
# This is required by turbo with "remoteCache": { "signature": true }
# tbc --auto-env does not set this variable.
TURBO_REMOTE_CACHE_SIGNATURE_KEY: super_secret
TURBO_TELEMETRY_DISABLED: 1
TBC_SUMMARY: true
TBC_HOST: localhost:9092

@@ -100,8 +101,8 @@ jobs:
run: chmod +x $GITHUB_WORKSPACE/tbc

- name: Build monorepo for the first time
run: |
cd end2end/monorepo
run: >
cd end2end/monorepo &&
$GITHUB_WORKSPACE/tbc pnpm build 2>&1 | tee $GITHUB_WORKSPACE/first_build.log

- name: Check that cache worked correctly
@@ -111,24 +112,24 @@ jobs:
run: pnpm -C end2end/monorepo wipe

- name: Build monorepo for the second time to check that artifacts were taken from the remote cache
run: |
cd end2end/monorepo
run: >
cd end2end/monorepo &&
$GITHUB_WORKSPACE/tbc pnpm build 2>&1 | tee $GITHUB_WORKSPACE/second_build.log

- name: Check that cache worked correctly for the second time
run: |
run: >
grep -q "FULL TURBO" second_build.log &&
grep -q "server stats downloads=2" second_build.log

- name: Check the --ignore-failures mode (invalid cache host)
env:
TBC_HOST: example.org:9093 # invalid
TBC_IGNORE_FAILURES: true
run: |
cd end2end/monorepo
run: >
cd end2end/monorepo &&
$GITHUB_WORKSPACE/tbc pnpm build 2>&1 | tee $GITHUB_WORKSPACE/third_build.log

- name: Check the log
run: |
run: >
grep -q "FULL TURBO" third_build.log &&
grep -q "cache proxy failed, just running the command" third_build.log