|
1 | 1 | name: Main workflow
|
2 | 2 | on: [push]
|
3 | 3 | jobs:
|
4 |
| - run: |
5 |
| - name: Run |
6 |
| - runs-on: ${{ matrix.os }} |
7 |
| - strategy: |
8 |
| - matrix: |
9 |
| - os: [ubuntu-latest, windows-latest, macos-latest] |
| 4 | + check: |
| 5 | + name: Checks |
| 6 | + runs-on: ubuntu-latest |
| 7 | + steps: |
| 8 | + - name: Checkout |
| 9 | + uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 |
| 10 | + - name: Set Node.js 20.x |
| 11 | + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 |
| 12 | + with: |
| 13 | + node-version: 20.x |
| 14 | + cache: yarn |
| 15 | + - name: Install Dependencies |
| 16 | + run: yarn install --frozen-lockfile |
| 17 | + - name: Lint |
| 18 | + run: yarn lint |
| 19 | + - name: TypeCheck |
| 20 | + run: yarn typecheck |
| 21 | + |
| 22 | + unit-test: |
| 23 | + name: Unit Tests |
| 24 | + runs-on: ubuntu-latest |
| 25 | + needs: check |
10 | 26 | steps:
|
11 | 27 | - name: Checkout
|
12 |
| - uses: actions/checkout@v4 |
| 28 | + uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 |
13 | 29 | - name: Set Node.js 20.x
|
14 |
| - uses: actions/setup-node@v4 |
| 30 | + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 |
15 | 31 | with:
|
16 | 32 | node-version: 20.x
|
17 | 33 | cache: yarn
|
18 | 34 | - name: Install Dependencies
|
19 | 35 | run: yarn install --frozen-lockfile
|
20 |
| - - if: matrix.os != 'windows-latest' |
21 |
| - name: Lint |
22 |
| - run: yarn lint |
23 | 36 | - name: Test
|
24 | 37 | run: yarn test
|
25 | 38 | - name: Build
|
26 | 39 | run: yarn build
|
| 40 | + |
| 41 | + build: |
| 42 | + name: Build |
| 43 | + runs-on: ubuntu-latest |
| 44 | + needs: check |
| 45 | + steps: |
| 46 | + - name: Checkout |
| 47 | + uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 |
| 48 | + - name: Set Node.js 20.x |
| 49 | + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 |
| 50 | + with: |
| 51 | + node-version: 20.x |
| 52 | + cache: yarn |
| 53 | + - name: Install Dependencies |
| 54 | + run: yarn install --frozen-lockfile |
| 55 | + - name: Build |
| 56 | + run: yarn build |
| 57 | + - name: Upload Artifact |
| 58 | + uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 |
| 59 | + with: |
| 60 | + name: lib |
| 61 | + path: lib |
| 62 | + |
| 63 | + integration-test: |
| 64 | + name: Integration Tests |
| 65 | + runs-on: ${{ matrix.os }} |
| 66 | + needs: |
| 67 | + - build |
| 68 | + - unit-test |
| 69 | + strategy: |
| 70 | + fail-fast: false |
| 71 | + matrix: |
| 72 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 73 | + steps: |
| 74 | + - name: Checkout |
| 75 | + uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 |
| 76 | + - name: Set Node.js 20.x |
| 77 | + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 |
| 78 | + with: |
| 79 | + node-version: 20.x |
| 80 | + cache: yarn |
| 81 | + - name: Install Dependencies |
| 82 | + run: yarn install --frozen-lockfile |
| 83 | + - name: Download Artifact |
| 84 | + uses: actions/download-artifact@9c19ed7fe5d278cd354c7dfd5d3b88589c7e2395 # v4.1.6 |
| 85 | + - name: Run Integration Tests |
| 86 | + uses: ./ |
| 87 | + - name: Graphviz test |
| 88 | + run: dot -V |
0 commit comments