Skip to content

Commit

Permalink
ci: Extend node version matrix and check docs (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
inwaar authored Oct 7, 2024
1 parent 063a8ea commit 73cc97c
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 22 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,28 @@ on:
pull_request:

jobs:
ci:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm run lint

tests:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]
node-version: [12, 14, 16, 18, 20, 22]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Linters
run: npm run lint
- name: Tests
run: npm test
- run: npm ci
- run: npm test
18 changes: 18 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: docs
on:
workflow_call:
pull_request:
push:

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm run docs
- name: Check README.md is up to date (forget to run 'npm run docs'?)
uses: NathanielHill/fail-if-changes@9e6ed6bb0543551728592d8114cfaa1dcd9155a6
16 changes: 6 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: release

on:
push:
Expand All @@ -10,19 +10,15 @@ jobs:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: "20.x"
node-version: 20
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Release
- run: npm ci
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release

0 comments on commit 73cc97c

Please sign in to comment.