.github/workflows/ci.yml
name: ci
on: push
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# FIXME: Jest snapshots are different in node v10
# node-version: [10, 12]
node-version: [12]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn run test-ci
env:
CI: true
- name: report coverage
if: matrix.os == 'ubuntu-latest' && matrix.node-version == 12
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.json test/coverage/lcov.info
./cc-test-reporter upload-coverage --id ${{ secrets.CC_TEST_REPORTER_ID }} || true
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn run lint