Skip to content

use GH actions instead of Travis CI #3

use GH actions instead of Travis CI

use GH actions instead of Travis CI #3

Workflow file for this run

name: CI
on:
- push
- pull_request
env:
latest-node: 22.x
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
node:
- version: 18.x
- version: 20.x
- version: ${{ latest-node }}

Check failure on line 18 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 18, Col: 22): Unrecognized named-value: 'latest-node'. Located at position 1 within expression: latest-node .github/workflows/main.yml (Line: 39, Col: 25): Unrecognized named-value: 'latest-node'. Located at position 1 within expression: latest-node
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node.version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node.version }}
cache: "npm"
- run: npm ci
- run: npm test
coverage:
name: Coverage
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ latest-node }}
cache: "npm"
- name: Coverage
run: npm run coverage:lcov
- name: Coveralls
uses: coverallsapp/[email protected]