Skip to content

Commit

Permalink
ci: rename master to main, update CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
webketje committed Sep 26, 2022
1 parent 895b593 commit 66a6f05
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ on:
push:
branches: ['**']
pull_request:
branches: ['master']
branches: ['main']

jobs:
pre-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: 'npm'

Expand All @@ -19,7 +19,7 @@ jobs:
- run: npm run lint:check

branch-test:
if: github.ref_name != 'master' && success()
if: github.ref_name != 'main' && success()
needs: pre-test
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -28,16 +28,16 @@ jobs:
node: ['12.0']
name: Testing Node ${{ matrix.node }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: 'npm'

- run: npm install
- run: npm install --no-package-lock
- run: npm test

test:
if: github.ref_name == 'master' && success()
if: github.ref_name == 'main' && success()
needs: pre-test
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -46,18 +46,18 @@ jobs:
node: ['12.0', '14.0', '16.0']
name: Testing Node ${{ matrix.node }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'npm'

- run: npm install
- run: npm install --no-package-lock
- run: npm test
- if: matrix.os == 'ubuntu-latest' && matrix.node == '16.0'
run: npm run coverage
- if: matrix.os == 'ubuntu-latest' && matrix.node == '16.0'
uses: coverallsapp/github-action@v1.1.2
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ github.token }}
path-to-lcov: ./coverage.info

0 comments on commit 66a6f05

Please sign in to comment.