@ 260528.1
current
name: Node.js CI

on:
  push:
  pull_request:
  schedule:
    - cron: "0 0 * * *"

permissions:
  contents: read

jobs:
  test:
    runs-on: ${{ matrix.operating-system }}

    strategy:
      matrix:
        node-version: [20.x, 22.x, 24.x]
        operating-system: [ubuntu-latest, windows-latest, macos-latest]

    steps:
      - name: Harden Runner
        uses: step-security/harden-runner@f808768d1510423e83855289c910610ca9b43176 # v2.17.0
        with:
          egress-policy: audit

      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
        with:
          node-version: ${{ matrix.node-version }}
      - run: npm ci --ignore-scripts
      - name: Environment Information
        run: npx envinfo
      - name: Run Test
        run: npm test

  nightly-daily-test:
    runs-on: ubuntu-latest
    container: node
    steps:
      - name: Harden Runner
        uses: step-security/harden-runner@f808768d1510423e83855289c910610ca9b43176 # v2.17.0
        with:
          egress-policy: audit

      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - run: npm i -g n && n nightly
      - run: node -p process.versions
      - name: Environment Information
        run: npx envinfo
      - run: npm ci --ignore-scripts
      - name: Environment Information
        run: npx envinfo
      - name: Run Test
        continue-on-error: true
        run: npm test