Skip to content

pkgjs/action

Repository files navigation

pkgjs/action

Use the pkgjs/action workflow to automatically add new versions of Node.js to your test matrix.

Basic usage

  1. Define a miminum supported Node.js version in your package.json, e.g.
{
  "engines": {
    "node": "^16 || ^14 || ^12"
  }
}
  1. Create a file (e.g. ci.yaml) in your .github/workflows/ folder:
on:
  push:
    branches:
    - main
  pull_request:

jobs:
  test:
    uses: pkgjs/action/.github/workflows/node-test.yaml@v0
    with:
      upgrade-policy: lts           # optional

With the above configuration, a test matrix will be created with all the Node.js LTS versions starting from v12. In January, 2022, the above example would yield the following versions: 16, 14, 12 (LTS releases which will not be removed from the matrix), as well as 17 (current non-LTS release - will be removed from the matrix when the support ends).

By default, the test script will check out your repository, execute npm install and then execute an npm test using the latest Node.js version in every release line in the test matrix.

Further reading


About

Github Actions tooling for testing Node.js packages

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy