From 67946b266776cb2dcd304a4046e4f69059196802 Mon Sep 17 00:00:00 2001 From: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> Date: Mon, 18 Oct 2021 18:40:45 +0100 Subject: [PATCH] Update GH Actions test workflow --- .github/workflows/main.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dfb994390..ed959a51e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,9 +1,12 @@ name: CI -on: [push, pull_request] +on: + push: + branches: [master] + pull_request: jobs: - build: + unit-test-and-build: runs-on: ubuntu-latest steps: - name: Checkout @@ -11,7 +14,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v2 with: - node-version: '12' + node-version: '16' - name: Cache node modules uses: actions/cache@v2.1.6 with: @@ -24,14 +27,14 @@ jobs: yarn run lint --no-fix - name: Test run: | - yarn run coverage:unit + yarn run coverage:unit --colors - name: Docs uses: andstor/jsdoc-action@v1 with: config_file: jsdoc.conf.json # TODO: upload to GH pages? - name: Upload coverage to Codecov - uses: codecov/codecov-action@v2.1.0 + uses: codecov/codecov-action@v2 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage/lcov.info @@ -58,7 +61,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v2 with: - node-version: '12' + node-version: '16' - name: e2e uses: cypress-io/github-action@v2 with: @@ -70,7 +73,7 @@ jobs: env: CYPRESS_baseUrl: http://localhost:8080/ - name: Upload coverage to Codecov - uses: codecov/codecov-action@v2.1.0 + uses: codecov/codecov-action@v2 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage/lcov.info