Merge pull request #68 from ndaidong/3.0.7 #63
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
# GitHub actions | |
# https://docs.github.com/en/free-pro-team@latest/actions | |
name: ci-test | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node_version: [18.x, 20.x, 21.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup Node.js v${{ matrix.node_version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node_version }} | |
- name: run npm scripts | |
run: | | |
npm install | |
npm run lint | |
npm run test | |
- name: Coveralls Parallel | |
uses: coverallsapp/github-action@v2 | |
with: | |
flag-name: run-${{ join(matrix.*, '-') }} | |
parallel: true | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: cache node modules | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
finish: | |
needs: test | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: coverallsapp/github-action@v2 | |
with: | |
parallel-finished: true | |
carryforward: "run-18.x,run-20.x,run-21.x" |