-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (41 loc) · 1.26 KB
/
on-push-branch-turbo.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Pipeline branch - test turborepo
on:
push:
branches:
- feat/asap-285-use-turbo-for-tests
jobs:
setup-turbo:
runs-on: ubuntu-latest
environment: Branch
outputs:
matrix: ${{ steps.setup.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Re-Build
uses: ./.github/actions/build-rebuild
- name: Setup turborepo test pipeline
id: setup
run: |
MATRIX=$(yarn node ./.github/scripts/manage-workflows/create-test-matrix.js)
echo $MATRIX
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
test-turbo:
needs: setup-turbo
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJson(needs.setup-turbo.outputs.matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Re-Build
uses: ./.github/actions/build-rebuild
- name: Cache .turbo
uses: actions/cache@v3
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ matrix.package }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-${{ matrix.package }}-
- name: Test ${{ matrix.package }}
run: yarn turbo test --filter="${{ matrix.package }}" --cache-dir=.turbo --only --no-deps