Skip to content

chore: oxlint with oxfmt #88

chore: oxlint with oxfmt

chore: oxlint with oxfmt #88

Workflow file for this run

name: 'Tests'
on:
pull_request:
push:
branches: [ 'main' ]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test (${{ matrix.os }}, Node ${{ matrix.node-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
node-version: [ '20.x', '22.x', '24.x' ]
include:
# A darwin leg is what covers the iOS-specific suites - they are gated
# on the platform and never execute anywhere else. One version is
# enough for that; 24 is the active LTS.
- os: macos-latest
node-version: '24.x'
steps:
- name: Harden the runner (Audit all outbound calls)
# only supported on the Ubuntu runners
if: runner.os == 'Linux'
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# nothing here needs git auth after checkout, and npm test runs
# repository code
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install
run: npm ci --ignore-scripts
- name: Test
run: npm test
lint:
name: Lint & Format
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '24.x'
cache: 'npm'
- name: Install
run: npm ci --ignore-scripts
- name: Lint
run: npm run lint
- name: Check formatting
run: npm run format.check
doctor:
name: Doctor (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# No darwin leg: unlike the CLI suites, these stub the platform through
# a fake HostInfo rather than probing it, so a second OS runs identical
# assertions.
node-version: [ '20.x', '22.x', '24.x' ]
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: packages/doctor/package-lock.json
- name: Install
working-directory: packages/doctor
run: npm ci
- name: Test
working-directory: packages/doctor
run: npm test