.github/workflows/test.yml
name: Tests
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
- run: curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
name: Downloading CodeClimate reporter
- run: chmod +x ./cc-test-reporter
name: Setting permissions
- run: ./cc-test-reporter before-build
name: Preparing reporter
- run: npm ci
name: Installing dependencies
- run: npm test
name: Running tests
- run: ./cc-test-reporter after-build --exit-code=$?
name: Uploading coverage
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}