Skip to content

Commit

Permalink
CI: lint & test on PRs too, with Node 18-22 💚
Browse files Browse the repository at this point in the history
  • Loading branch information
derhuerst committed Aug 8, 2024
1 parent 7635823 commit 66ca7d3
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 12 deletions.
13 changes: 1 addition & 12 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,7 @@ on:
jobs:
lint-test:
name: lint, build & test
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npm test
uses: './.github/workflows/lint-test.yml'

build-and-publish:
name: build & publish Docker image
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/lint-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: lint, build & test
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
workflow_call:

jobs:
lint-test:
name: lint, build & test
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- '16.x'
- '18.x'
- '20.x'
- '22.x'

steps:
- name: checkout
uses: actions/checkout@v4
- name: setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- run: npm ci

- run: npm run lint
- run: npm run build
- run: npm test

0 comments on commit 66ca7d3

Please sign in to comment.