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
39 changes: 28 additions & 11 deletions .github/workflows/nodejs-ci-action.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
branches: [main]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: nodejs-ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
node-version: [20.x, 22.x, 24.x]

Expand All @@ -24,12 +27,26 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}

- run: npm ci
- run: npm test
- run: npx @pkgjs/support@latest validate
- run: npm run coverage
- name: upload coverage to Coveralls
uses: coverallsapp/github-action@master

- name: Upload Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-${{ matrix.node-version }}
- run: npx @pkgjs/support validate
parallel: true

finish:
name: Node.js CI
needs: build
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
39 changes: 23 additions & 16 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,38 @@
on:
push:
branches:
- main
name: release-please
on:
push:
branches:
- main

permissions:
contents: write
issues: write
pull-requests: write
id-token: write

jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: GoogleCloudPlatform/release-please-action@v5
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
package-name: npcheck

publish:
runs-on: ubuntu-latest
needs: release-please
if: needs.release-please.outputs.release_created == 'true'

steps:
- uses: actions/checkout@v6
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v6
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}
node-version: 22
registry-url: "https://registry.npmjs.org"
package-manager-cache: false
- run: npm ci
if: ${{ steps.release.outputs.release_created }}
- run: npm test
if: ${{ steps.release.outputs.release_created }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPCHECK_PUBLISH}}
if: ${{ steps.release.outputs.release_created }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

## Prerequisites

- Node.js - version 20.x or greater
- Node.js - version 22.x or greater

## Install

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"npcheck": "index.js"
},
"engines": {
"node": ">=20"
"node": ">=22"
},
"type": "commonjs",
"scripts": {
Expand Down