-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
add9258
commit 03c31f0
Showing
1 changed file
with
17 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,25 @@ | ||
name: Tests | ||
on: [push, pull_request] | ||
env: | ||
CI: true | ||
on: ["push", "pull_request"] | ||
|
||
jobs: | ||
test: | ||
name: Node ${{ matrix.node }} on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
name: Test Coveralls | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node: [ 14, 16, 18, 19] | ||
os: [ubuntu-latest] | ||
jobs: | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set Node.js version | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Install npm dependencies | ||
run: npm install # switch to `npm ci` when Node.js 6 support is dropped | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Run lint | ||
run: npm run lint | ||
- name: Use Node.js 16.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
|
||
- name: Run tests | ||
run: npm run test | ||
|
||
- name: test token | ||
run: echo "${{ secrets.COVERALLS_REPO_TOKEN }}" | ||
|
||
- name: Coveralls | ||
run: cat ./coverage/lcov.info | node ./bin/coveralls.js | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
COVERALLS_SERVICE_NAME: CI-pipeline | ||
COVERALLS_SERVICE_JOB_ID: ${{github.run_id}} | ||
COVERALLS_SERVICE_JOB_NUMBER: ${{github.run_number}} | ||
COVERALLS_FLAG_NAME: ${{matrix.os}}-node-${{ matrix.node }} | ||
COVERALLS_PARALLEL: true | ||
NODE_COVERALLS_DEBUG: 1 | ||
|
||
finish: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v2 | ||
- name: npm install, make test-coverage | ||
run: | | ||
npm install | ||
make test | ||
- name: Coveralls Finished | ||
run: | | ||
curl -kv -d 'payload[build_num]=${{github.run_id}}&payload[status]=done' https://coveralls.io/webhook?repo_token=${COVERALLS_REPO_TOKEN} | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
- name: Coveralls | ||
uses: coverallsapp/github-action@v2 |