2021-06-18 14:08:10 +02:00
|
|
|
name: Node.js CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-06-18 19:00:12 +02:00
|
|
|
branches: [main]
|
2021-06-18 14:08:10 +02:00
|
|
|
pull_request:
|
2021-06-18 19:00:12 +02:00
|
|
|
branches: [main]
|
2021-06-18 14:08:10 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version: [16.x]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
2021-06-18 19:00:12 +02:00
|
|
|
|
|
|
|
- name: Get yarn cache directory path
|
|
|
|
id: yarn-cache-dir-path
|
|
|
|
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
|
|
|
|
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
|
|
with:
|
|
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-yarn-
|
|
|
|
|
2021-06-18 14:08:10 +02:00
|
|
|
- run: yarn install
|
|
|
|
- run: yarn typecheck
|
|
|
|
- run: yarn lint:all
|
2021-06-18 19:00:12 +02:00
|
|
|
- run: yarn test
|