Skip to content

ci: update macos runner #2322

ci: update macos runner

ci: update macos runner #2322

Workflow file for this run

name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '11 11 * * 1'
workflow_dispatch:
jobs:
build:
uses: ./.github/workflows/build.yml
typings:
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
id: node
uses: actions/setup-node@v4
with:
node-version: lts/iron # 20
cache: 'npm'
- run: npm clean-install
- name: Load cached dist
uses: actions/cache@v4
id: dist
with:
path: dist
key: ${{ needs.build.outputs.cache-key }}
fail-on-cache-miss: true
- name: Check TypeScript type definitions
run: npm run test:types
node:
needs:
- build
continue-on-error: ${{ !startsWith(matrix.node-version, 'lts') }}
strategy:
fail-fast: false
matrix:
node-version:
- lts/hydrogen # 18
- lts/iron # 20
- current
suite:
- tap:node
- test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
id: node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
check-latest: true
- run: npm clean-install
- name: Load cached dist
uses: actions/cache@v4
id: dist
with:
path: dist
key: ${{ needs.build.outputs.cache-key }}
fail-on-cache-miss: true
- name: Run Test Suite
run: npm run ${{ matrix.suite }}
deno:
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Load cached dist
uses: actions/cache@v4
id: dist
with:
path: dist
key: ${{ needs.build.outputs.cache-key }}
fail-on-cache-miss: true
- name: Test Deno Definitions
run: deno check dist/deno/index.ts
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/iron # 20
cache: 'npm'
- run: npm clean-install
- name: Test Deno
run: npm run tap:deno
bun:
needs:
- build
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Load cached dist
uses: actions/cache@v4
id: dist
with:
path: dist
key: ${{ needs.build.outputs.cache-key }}
fail-on-cache-miss: true
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/iron # 20
cache: 'npm'
- run: npm clean-install
- name: Test Bun
run: npm run tap:bun
workerd:
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/iron # 20
cache: 'npm'
- run: npm clean-install
- run: npm install --global workerd
- name: Load cached dist
uses: actions/cache@v4
id: dist
with:
path: dist
key: ${{ needs.build.outputs.cache-key }}
fail-on-cache-miss: true
- name: Run Test Suite
run: npm run tap:workerd
edge-runtime:
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/iron # 20
cache: 'npm'
- run: npm clean-install
- name: Load cached dist
uses: actions/cache@v4
id: dist
with:
path: dist
key: ${{ needs.build.outputs.cache-key }}
fail-on-cache-miss: true
- name: Run Test Suite
run: npm run tap:edge-runtime
browsers:
needs:
- build
runs-on: ${{ matrix.runs-on || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
browser:
- chrome:headless
- firefox:headless
- edge:headless
include:
- runs-on: macos-14
browser: safari
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/iron # 20
cache: 'npm'
- run: npm clean-install
- run: npm install --global testcafe@3
- name: Load cached dist
uses: actions/cache@v4
id: dist
with:
path: dist
key: ${{ needs.build.outputs.cache-key }}
fail-on-cache-miss: true
- name: Run Test Suite
run: npm run tap:browsers
env:
BROWSER: ${{ matrix.browser }}
electron:
needs:
- build
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/iron # 20
cache: 'npm'
- run: npm clean-install
- name: Load cached dist
uses: actions/cache@v4
id: dist
with:
path: dist
key: ${{ needs.build.outputs.cache-key }}
fail-on-cache-miss: true
- name: Install Electron
run: npm install --global electron
- name: Run Test Suite
run: npm run tap:electron