|
9 | 9 | - '**'
|
10 | 10 |
|
11 | 11 | jobs:
|
| 12 | + cleanup-runs: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - uses: rokroskar/workflow-run-cleanup-action@master |
| 16 | + env: |
| 17 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 18 | + if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" |
| 19 | + |
12 | 20 | lint-and-typecheck:
|
13 | 21 | name: Running TypeScript compiler & ESLint
|
14 | 22 | runs-on: ubuntu-latest
|
|
41 | 49 | run: yarn lint:prettier:ci
|
42 | 50 | - name: check copyright headers
|
43 | 51 | run: yarn check-copyright-headers
|
| 52 | + test: |
| 53 | + name: Node v${{ matrix.node-version }} on ${{ matrix.os }} |
| 54 | + strategy: |
| 55 | + fail-fast: false |
| 56 | + matrix: |
| 57 | + # https://github.com/actions/setup-node/issues/27 |
| 58 | + node-version: [8.17.0, 10.x, 12.x, 13.x] |
| 59 | + # Windows tests are failing for whatever reason, so just do linux and mac for now |
| 60 | + os: [ubuntu-latest, macOS-latest] |
| 61 | + runs-on: ${{ matrix.os }} |
| 62 | + |
| 63 | + steps: |
| 64 | + - uses: actions/checkout@v2 |
| 65 | + - name: Get yarn cache |
| 66 | + id: yarn-cache |
| 67 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 68 | + - uses: actions/cache@v1 |
| 69 | + with: |
| 70 | + path: ${{ steps.yarn-cache.outputs.dir }} |
| 71 | + key: ${{ runner.os }}-node-${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }} |
| 72 | + restore-keys: | |
| 73 | + ${{ runner.os }}-node-${{ matrix.node-version }}-yarn- |
| 74 | + - name: Use Node.js ${{ matrix.node-version }} |
| 75 | + uses: actions/setup-node@v1 |
| 76 | + with: |
| 77 | + node-version: ${{ matrix.node-version }} |
| 78 | + - name: install |
| 79 | + run: yarn install-no-ts-build |
| 80 | + - name: run tests |
| 81 | + run: yarn test-ci-partial |
| 82 | + env: |
| 83 | + CI: true |
0 commit comments