onebeyond/systemic-knex

View on GitHub
.github/workflows/ci.yml

Summary

Maintainability
Test Coverage
name: Node.js CI

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

permissions:  # added using https://github.com/step-security/secure-workflows
  contents: read

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [18.x, 20.x, 21.x]
    steps:
      - name: ๐Ÿ” Harden Runner
        uses: step-security/harden-runner@03bee3930647ebbf994244c21ddbc0d4933aab4f # v2.3.0
        with:
          disable-sudo: true
          egress-policy: block
          allowed-endpoints: >
            github.com:443
            registry.npmjs.org:443
            api.github.com:443
            nodejs.org:443
      - name: โš™๏ธ Git Checkout
        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
      - name: โš™๏ธ Install Node versions
        uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
        with:
          node-version: ${{ matrix.node-version }}
      - name: โš™๏ธ Install dependencies
        run: npm ci
      - name: ๐Ÿ‘€ Lint files
        run: npm run lint
      - name: ๐Ÿงช Run tests
        run: npm run test