Skip to content

feat(babel): add runtimeVersion option for deduplicating Babel helpers #35

feat(babel): add runtimeVersion option for deduplicating Babel helpers

feat(babel): add runtimeVersion option for deduplicating Babel helpers #35

Workflow file for this run

name: CI
# Remove default permissions of GITHUB_TOKEN for security
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
permissions: {}
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
jobs:
test:
timeout-minutes: 20
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node_version: [22, 24]
include:
# Active LTS + other OS
- os: macos-latest
node_version: 24
- os: windows-latest
node_version: 24
fail-fast: false
name: 'Build&Test: node-${{ matrix.node_version }}, ${{ matrix.os }}'
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
- name: Set node version to ${{ matrix.node_version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node_version }}
cache: 'pnpm'
- name: Install deps
run: pnpm install
- name: Build
run: pnpm run build
- name: Test
run: pnpm run test
test-babel7:
timeout-minutes: 20
runs-on: ubuntu-latest
name: 'Test: babel 7 compat'
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
- name: Set node version to 24
uses: actions/setup-node@v6
with:
node-version: 24
cache: 'pnpm'
- name: Override Babel runtime deps to v7
run: yq -i '.overrides."@babel/core" = "^7.29.0" | .overrides."@babel/plugin-transform-runtime" = "^7.29.0" | .overrides."@babel/runtime" = "^7.29.0"' pnpm-workspace.yaml
- name: Install deps
run: pnpm install --no-frozen-lockfile
- name: Install @babel/core v7 types
run: pnpm add -Dw @types/babel__core@^7.20.5
- name: Build
run: pnpm run build
- name: Test
run: pnpm run test
- name: Lint (type check)
run: pnpm run lint
test-passed:
if: (!cancelled() && !failure())
needs: [test, test-babel7]
runs-on: ubuntu-latest
name: Build & Test Passed or Skipped
steps:
- run: echo "Build & Test Passed or Skipped"
test-failed:
if: (!cancelled() && failure())
needs: [test, test-babel7]
runs-on: ubuntu-latest
name: Build & Test Failed
steps:
- run: echo "Build & Test Failed"
lint:
timeout-minutes: 10
runs-on: ubuntu-latest
name: 'Lint: node-24, ubuntu-latest'
steps:
- uses: actions/checkout@v6
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
- name: Set node version to 24
uses: actions/setup-node@v6
with:
node-version: 24
cache: 'pnpm'
- name: Install deps
run: pnpm install
- name: Build
run: pnpm run build
- name: Lint
run: pnpm run lint
- name: Check formatting
run: pnpm run format --check
# From https://github.com/rhysd/actionlint/blob/main/docs/usage.md#use-actionlint-on-github-actions
- name: Check workflow files
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
./actionlint -color -shellcheck=""