|
13 | 13 |
|
14 | 14 | jobs:
|
15 | 15 | primary_code_validation_and_tests:
|
16 |
| - name: Primary code validation and tests |
| 16 | + name: Typecheck and tests |
17 | 17 | runs-on: ubuntu-latest
|
18 | 18 | steps:
|
19 | 19 | - uses: actions/checkout@v2
|
|
49 | 49 | - name: Typecheck all packages
|
50 | 50 | run: yarn typecheck
|
51 | 51 |
|
52 |
| - - name: Check code formatting |
53 |
| - run: yarn format-check |
54 |
| - |
55 |
| - - name: Run linting |
56 |
| - run: yarn lint |
57 |
| - |
58 |
| - - name: Validate spelling |
59 |
| - run: yarn check:spelling |
60 |
| - |
61 | 52 | - name: Run unit tests
|
62 | 53 | run: yarn test
|
63 | 54 | env:
|
|
71 | 62 | flags: unittest
|
72 | 63 | name: codecov
|
73 | 64 |
|
| 65 | + linting_and_style: |
| 66 | + name: Code style and lint |
| 67 | + runs-on: ubuntu-latest |
| 68 | + steps: |
| 69 | + - uses: actions/checkout@v2 |
| 70 | + - name: Use Node.js ${{ env.PRIMARY_NODE_VERSION }} |
| 71 | + uses: actions/setup-node@v1 |
| 72 | + with: |
| 73 | + node-version: ${{ env.PRIMARY_NODE_VERSION }} |
| 74 | + |
| 75 | + - name: Get yarn cache directory path |
| 76 | + id: yarn-cache-dir-path |
| 77 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 78 | + |
| 79 | + - uses: actions/cache@v1 |
| 80 | + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) |
| 81 | + with: |
| 82 | + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} |
| 83 | + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
| 84 | + restore-keys: | |
| 85 | + ${{ runner.os }}-yarn- |
| 86 | +
|
| 87 | + # This also runs a build as part of the postinstall bootstrap |
| 88 | + - name: Install dependencies and build |
| 89 | + run: | |
| 90 | + yarn --ignore-engines --frozen-lockfile |
| 91 | + yarn check-clean-workspace-after-install |
| 92 | +
|
| 93 | + - name: Check code formatting |
| 94 | + run: yarn format-check |
| 95 | + |
| 96 | + - name: Run linting |
| 97 | + run: yarn lint |
| 98 | + |
| 99 | + - name: Validate spelling |
| 100 | + run: yarn check:spelling |
| 101 | + |
74 | 102 | integration_tests:
|
75 | 103 | name: Run integration tests on primary Node.js version
|
76 | 104 | runs-on: ubuntu-latest
|
@@ -143,7 +171,7 @@ jobs:
|
143 | 171 | publish_canary_version:
|
144 | 172 | name: Publish the latest code as a canary version
|
145 | 173 | runs-on: ubuntu-latest
|
146 |
| - needs: [primary_code_validation_and_tests, unit_tests_on_other_node_versions, integration_tests] |
| 174 | + needs: [primary_code_validation_and_tests, unit_tests_on_other_node_versions, linting_and_style, integration_tests] |
147 | 175 | if: github.ref == 'refs/heads/master'
|
148 | 176 | steps:
|
149 | 177 | - uses: actions/checkout@v2
|
|
0 commit comments