Skip to content

Commit

Permalink
Update github actions to use turbo cache
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuAndrade committed Mar 25, 2024
1 parent 6ebe2e8 commit e8b6345
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion .github/actions/prepare-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,20 @@ runs:
run: pnpm install -r --frozen-lockfile --strict-peer-dependencies
shell: bash

- name: Cache turbo build setup
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: 📦 Build
if: ${{ inputs.build == 'true' }}
run: |
if echo ${{ inputs.build-only-packages }}
then
pnpm -r --filter "./packages/*" build
turbo build:packages
else
${{ inputs.build-command }}
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
build-only-packages: true

- name: ✅ Run Mocha/Chai unit tests
run: GITHUB_ACTION=true pnpm test:packages
run: GITHUB_ACTION=true turbo test:packages

test-server:
needs: [test-pacakges]
Expand All @@ -42,7 +42,7 @@ jobs:
build-only-packages: true

- name: ✅ Run Mocha/Chai unit tests
run: GITHUB_ACTION=true pnpm coverage:junit
run: GITHUB_ACTION=true turbo coverage:junit

- name: ⬆️ Publish Unit Test Results
uses: EnricoMi/[email protected]
Expand Down

0 comments on commit e8b6345

Please sign in to comment.