Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 42 additions & 23 deletions .github/workflows/build-lint-test.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,67 +4,86 @@ on:
workflow_call:

jobs:
prepare:
name: Prepare
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm ci

build:
name: Build
needs: prepare
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 16.x, 18.x, 20.x]
node-version: [22.x]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm i -g npm@6
- run: npm i
node-version-file: '.nvmrc'
- run: npm ci
- run: npm run build
- name: Require clean working directory
shell: bash
run: |
if ! git diff --exit-code -- . ':!dist/*.map'; then
if ! git diff --exit-code; then
echo "Working tree dirty at end of job"
exit 1
fi

lint:
name: Lint
needs: prepare
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
node-version: [22.x]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm i -g npm@6
- run: npm i
node-version-file: '.nvmrc'
- run: npm ci
- run: npm run lint
- name: Require clean working directory
shell: bash
run: |
if ! git diff --exit-code; then
echo "Working tree dirty at end of job"
exit 1
fi

test:
name: Test
needs: prepare
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 16.x, 18.x, 20.x]
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm i -g npm@6
- run: npm i
node-version-file: '.nvmrc'
- run: npm ci
- run: npm run test
- name: Require clean working directory
shell: bash
run: |
if ! git diff --exit-code -- . ':!dist/*.map' ':!package-lock.json' ; then
if ! git diff --exit-code; then
echo "Working tree dirty at end of job"
exit 1
fi
2 changes: 1 addition & 1 deletion .nvmrc
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
v12
lts/*
Loading