2021-02-02 14:07:02 +01:00
|
|
|
name: 'CI'
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2022-02-14 15:47:10 +01:00
|
|
|
- v4
|
2021-02-02 14:07:02 +01:00
|
|
|
tags:
|
|
|
|
- '**'
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '**'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
2022-01-13 12:57:08 +01:00
|
|
|
node: ['16', '14']
|
2021-02-02 14:07:02 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node }}
|
|
|
|
|
|
|
|
- name: Cache node_modules
|
|
|
|
uses: actions/cache@v2
|
|
|
|
env:
|
|
|
|
cache-name: cache-node-modules
|
|
|
|
with:
|
|
|
|
path: ~/.npm
|
|
|
|
key: ${{ runner.os }}-${{ matrix.node }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
restore-keys: ${{ runner.os }}-${{ matrix.node }}-build-${{ env.cache-name }}-
|
|
|
|
|
|
|
|
- run: npm ci
|
2021-10-27 12:27:14 +02:00
|
|
|
- run: npm run codegen:apollo
|
2021-02-02 14:07:02 +01:00
|
|
|
- run: npm run lint
|
|
|
|
# - run: npm test
|
|
|
|
- run: npm run build
|
|
|
|
|
|
|
|
# coverage:
|
|
|
|
# runs-on: ubuntu-latest
|
|
|
|
# steps:
|
|
|
|
# - uses: actions/checkout@v2
|
|
|
|
# - uses: actions/setup-node@v2
|
|
|
|
# - run: npm ci
|
|
|
|
# - uses: paambaati/codeclimate-action@v2.7.5
|
|
|
|
# env:
|
|
|
|
# CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
|
|
|
# with:
|
|
|
|
# coverageCommand: npm test
|