Skip to content

Commit

Permalink
chore: redo "Test without Turbo cache" workflow
Browse files Browse the repository at this point in the history
Previously: No felixmosh/turborepo-gh-artifacts, Turbo can't read/write persisted caches
Now: Turbo is executed with --force flag

This way we can override broken Turbo caches
  • Loading branch information
Leksat committed May 1, 2024
1 parent 264ec90 commit b3487bc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/test_without_turbo_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ on:
workflow_dispatch:

jobs:

test:
name: Test
runs-on: ubuntu-20.04
steps:
- name: Init check
if: ${{ github.repository != 'AmazeeLabs/silverback-template'}}
run: echo 'Please run the INIT script. See the root README.md for instructions.' && false

- name: Checkout
uses: actions/checkout@v3
with:
Expand All @@ -16,8 +19,18 @@ jobs:
- name: Setup
uses: ./.github/actions/setup

- name: TurboRepo local server
uses: felixmosh/turborepo-gh-artifacts@v2
with:
server-token: 'local'
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Test
run: pnpm turbo:test
run: pnpm turbo:test:force
env:
TURBO_API: 'http://127.0.0.1:9080'
TURBO_TOKEN: 'local'
TURBO_TEAM: 'local'

- name: Upload Playwright report
uses: actions/upload-artifact@v3
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"test:format:workspaces": "pnpm --workspace-concurrency=1 -r exec prettier '**/*.{js,cjs,mjs,ts,jsx,tsx,gql,graphql,graphqls,md,mdx,json,htm,html}' --ignore-path='./.gitignore'",
"turbo:local": "if [ -z $CI ]; then echo $(date)$RANDOM > apps/cms/turbo-seed.txt; fi",
"turbo:test": "pnpm turbo:local && pnpm tb test:unit --no-daemon --go-fallback --output-logs=new-only && pnpm tb test:integration --no-daemon --go-fallback --output-logs=new-only --concurrency=1",
"turbo:test:force": "pnpm tb test:unit --no-daemon --go-fallback --output-logs=new-only --force && pnpm tb test:integration --no-daemon --go-fallback --output-logs=new-only --concurrency=1 --force",
"turbo:test:quick": "pnpm turbo:local && pnpm tb test:unit --no-daemon --go-fallback --output-logs=new-only",
"turbo:prep": "pnpm turbo:local && pnpm tb prep --no-daemon --go-fallback --output-logs=new-only",
"turbo:prep:force": "rm -f apps/cms/web/sites/default/files/.sqlite && pnpm tb prep --no-daemon --go-fallback --force",
Expand Down

0 comments on commit b3487bc

Please sign in to comment.