Skip to content

CI

CI #516

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '15 0 * * *'
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [16, 18, 20, 22]
exclude:
- os: windows-latest
node-version: 14
- os: macos-latest
node-version: 14
runs-on: ${{ matrix.os }}
env:
OS: ${{ matrix.os }}
NODE: ${{ matrix.node-version }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: '*'
- run: npm ci
if: ${{ github.event_name != 'schedule' }}
- shell: bash
run: |
npm install -g $(jq -r '.packageManager' < package.json)
rm package-lock.json
npm i
if: ${{ github.event_name == 'schedule' }}
- run: npm run build
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ matrix.node-version }}
- run: |
node ./dist/main.js ./node_modules/typescript/lib/tsc.js
eslint:
name: ESLint
runs-on: ubuntu-latest
if: ${{ github.event_name != 'schedule' }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: '*'
- run: npm ci
- run: npx eslint .
dprint:
name: dprint
runs-on: ubuntu-latest
if: ${{ github.event_name != 'schedule' }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: '*'
- run: npm ci
- run: npx dprint check