CI: lint & test on PRs too, with Node 18-22 💚
This commit is contained in:
parent
76358235ab
commit
66ca7d32e5
2 changed files with 36 additions and 12 deletions
13
.github/workflows/docker-image.yml
vendored
13
.github/workflows/docker-image.yml
vendored
|
@ -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
|
||||
|
|
35
.github/workflows/lint-test.yml
vendored
Normal file
35
.github/workflows/lint-test.yml
vendored
Normal file
|
@ -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
|
Loading…
Reference in a new issue