Skip to content

docs: correctly capitalise node.js #999

docs: correctly capitalise node.js

docs: correctly capitalise node.js #999

Workflow file for this run

name: CI
# **What it does**: Runs tests.
# **Why we have it**: Ensures tests pass before merging code.
on:
push:
branches:
- main
paths-ignore:
- "docs/**"
- "*.md"
pull_request:
branches:
- main
paths-ignore:
- "docs/**"
- "*.md"
types: [opened, ready_for_review, reopened, synchronize]
permissions:
contents: read
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true
jobs:
dependency-review:
name: Dependency Review
if: >
github.event.pull_request.draft == false &&
github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Dependency review
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0
lint:
name: Lint Code
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
with:
check-latest: true
node-version: lts/*
- name: Install
run: npm i --ignore-scripts
- name: Audit NPM package signatures and provenance attestations
run: npm audit signatures
- name: Run ESLint
run: npm run lint
- name: Run Prettier
run: npm run lint:prettier
- name: Run License Checker
run: npm run lint:licenses
- name: Run Build
run: npm run build --if-present
commit-lint:
name: Lint Commit Messages
if: >
github.event.pull_request.draft == false &&
github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
persist-credentials: false
- name: Run Commitlint
uses: wagoid/commitlint-github-action@b948419dd99f3fd78a6548d48f94e3df7f6bf3ed # v6.2.1
with:
configFile: ./package.json
unit-tests:
name: Unit Tests
if: github.event.pull_request.draft == false
strategy:
matrix:
node-version: [20, 22]
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
permissions:
contents: read
steps:
- name: Check out repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: npm i --ignore-scripts
- name: Install macOS dependencies
if: matrix.os == 'macos-latest'
env:
HOMEBREW_NO_ANALYTICS: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
HOMEBREW_NO_AUTO_UPDATE: 1
run: brew install poppler
- name: Install Ubuntu dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get -q update
sudo apt-get -y --no-install-recommends install poppler-data poppler-utils
- name: Run tests
run: npm run test:unit:coverage
- name: Coveralls parallel
if: github.repository == 'Fdawgs/node-poppler'
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
flag-name: run-${{ matrix.node-version }}-${{ matrix.os }}
coverage:
name: Aggregate Coverage Calculations
needs: unit-tests
if: >
github.event.pull_request.draft == false &&
github.repository == 'Fdawgs/node-poppler'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Coveralls finished
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
automerge:
name: Automerge Dependabot PRs
needs: unit-tests
if: >
github.event.pull_request.draft == false &&
github.event_name == 'pull_request' &&
github.event.pull_request.user.login == 'dependabot[bot]'
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
steps:
- uses: fastify/github-action-merge-dependabot@e820d631adb1d8ab16c3b93e5afe713450884a4a # v3.11.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
merge-method: squash