Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
nbogie committed Jan 26, 2024
1 parent b11340b commit ecfdd16
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
44 changes: 23 additions & 21 deletions .github/workflows/ci-for-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,30 @@
name: Node.js CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
build:
build:
runs-on: ubuntu-latest

runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

strategy:
matrix:
node-version: [16.x, 18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm test
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci
- run: yarn run build --if-present
- run: yarn test
- name: Check code quality and formatting with lint and prettier
- run: yarn lint
- run: yarn format:check
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"start:dev": "nodemon src/app.js --ext 'js ejs html json css'",
"test": "jest --verbose",
"lint": "yarn eslint .",
"format": "yarn prettier --write ."
"format": "yarn prettier --write .",
"format:check": "yarn prettier ."
},
"dependencies": {
"dotenv": "^16.4.1",
Expand Down

0 comments on commit ecfdd16

Please sign in to comment.