test: extend presets test case #1379
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 12 */4 * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 22.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22.x | |
- run: npm ci | |
- run: | | |
npm run build | |
cd build && ls -l | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: build | |
path: | | |
build | |
package.json | |
retention-days: 1 | |
checks: | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
FORCE_COLOR: 3 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 22.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22.x | |
- uses: actions/download-artifact@v4 | |
with: | |
name: build | |
- run: npm ci | |
- name: Format | |
run: npm run fmt:check | |
- name: License | |
run: npm run test:license | |
- name: Size | |
run: npm run test:size | |
- name: Dep audit | |
run: npm run test:audit | |
- name: Circular | |
run: npm run test:circular | |
test: | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
FORCE_COLOR: 3 | |
strategy: | |
matrix: | |
node-version: [16.x, 20.x, 22.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: actions/download-artifact@v4 | |
with: | |
name: build | |
- run: npm ci | |
- name: Unit & types tests | |
if: matrix.node-version == '20.x' | |
run: | | |
npm run test:coverage | |
npm run test:types | |
- name: Unit tests | |
if: matrix.node-version != '20.x' | |
run: npm run test:unit | |
timeout-minutes: 1 | |
smoke-win32-node16: | |
runs-on: windows-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16.x | |
- uses: actions/download-artifact@v4 | |
with: | |
name: build | |
- run: npm run test:smoke:win32 | |
timeout-minutes: 1 | |
env: | |
FORCE_COLOR: 3 | |
smoke-bun: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Bun | |
uses: antongolub/action-setup-bun@v1 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: build | |
- run: | | |
bun test ./test/smoke/bun.test.js | |
bun ./test/smoke/ts.test.ts | |
timeout-minutes: 1 | |
env: | |
FORCE_COLOR: 3 | |
smoke-deno: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Deno | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
- uses: actions/download-artifact@v4 | |
with: | |
name: build | |
- run: deno test --allow-read --allow-sys --allow-env --allow-run ./test/smoke/deno.test.js | |
timeout-minutes: 1 | |
env: | |
FORCE_COLOR: 3 | |
smoke-node: | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
matrix: | |
node-version: [12, 14, 16, 18, 20, 22, 22-nightly] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: actions/download-artifact@v4 | |
with: | |
name: build | |
- name: cjs smoke test | |
run: npm run test:smoke:cjs | |
- name: mjs smoke test | |
run: npm run test:smoke:mjs | |
smoke-ts: | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
matrix: | |
ts: [4, 5, rc] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 22.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22.x | |
- name: Install deps | |
run: npm ci | |
- name: Install TypeScript ${{ matrix.ts }} | |
run: npm i --force --no-package-lock typescript@${{ matrix.ts }} | |
- uses: actions/download-artifact@v4 | |
with: | |
name: build | |
- name: tsc | |
run: npm run test:smoke:tsc | |
- name: tsx | |
run: npm run test:smoke:tsx | |
- name: ts-node | |
run: npm run test:smoke:ts-node |