Skip to content

Commit

Permalink
fix: ci config
Browse files Browse the repository at this point in the history
  • Loading branch information
StanleyMasinde committed Jan 6, 2024
1 parent 6f7cfce commit 2973310
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
name: Node.js CI

name: Build and test
on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]

branches: ["main"]
jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 19.x]
node-version: [18.x, 19.x]
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
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Setup PNPM
run: |
corepack enable
corepack prepare pnpm@latest --activate
- name: Setup environment variables
run: cp .env.example .env
- name: Install deps
run: pnpm i
- name: Lint 🧐
run: pnpm run lint
- name: Test 🧪
run: npm test

0 comments on commit 2973310

Please sign in to comment.