Skip to content

ci: add codeQuality and build job #2

ci: add codeQuality and build job

ci: add codeQuality and build job #2

Workflow file for this run

name: Format, Lint, & Test
on:
push:
branches:
- master
pull_request:
# types: [opened, synchronize, reopened, ready_for_review]
branches:
- '**'
jobs:
codeQuality:
name: Check code quality (lint and format)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Format check
run: npm run format
- name: Format check
run: npm run lint
build:
name: Build
runs-on: ubuntu-latest
- uses: actions/checkout@v4

Check failure on line 37 in .github/workflows/lint_and_test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/lint_and_test.yml

Invalid workflow file

You have an error in your yaml syntax on line 37
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Format check
run: npm run build
test:
name: Test on node ${{ matrix.node }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: [ '20.x', '18.x' ]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Test
run: npm test
- name: Run test to generate coverage
run: npm run test:coverage
- name: Coveralls
uses: coverallsapp/github-action@v2