Files
oxc-project__oxc/.github/workflows/ci.yml
renovate[bot] b79db0c08f chore(deps): update github actions (#25752)
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [CodSpeedHQ/action](https://redirect.github.com/CodSpeedHQ/action) |
action | patch | `v5.0.2` → `v5.0.3` | |
|
[cross-platform-actions/action](https://redirect.github.com/cross-platform-actions/action)
| action | minor | `v1.3.0` → `v1.4.0` | |
|
[semgrep/semgrep](https://redirect.github.com/semgrep/semgrep-proprietary)
| container | minor | `1.172.0` → `1.173.0` | |
|
[taiki-e/install-action](https://redirect.github.com/taiki-e/install-action)
| action | patch | `v2.85.9` → `v2.85.13` | `v2.86.1` (+2) |

---

### Release Notes

<details>
<summary>CodSpeedHQ/action (CodSpeedHQ/action)</summary>

###
[`v5.0.3`](https://redirect.github.com/CodSpeedHQ/action/releases/tag/v5.0.3)

[Compare
Source](https://redirect.github.com/CodSpeedHQ/action/compare/v5.0.2...v5.0.3)

Bumps the CodSpeed runner to
[v5.0.2](https://redirect.github.com/CodSpeedHQ/codspeed/releases/tag/v5.0.2).

##### 🐛 Bug Fixes

- Retry complete pinned binary downloads by
[@&#8203;art049](https://redirect.github.com/art049) in
[#&#8203;499](https://redirect.github.com/CodSpeedHQ/codspeed/pull/499)
- Accept `--exclude-allocations` and `--cycle-estimation` without a
value by
[@&#8203;not-matthias](https://redirect.github.com/not-matthias)

**Full Runner Changelog**:
<https://github.com/CodSpeedHQ/codspeed/blob/main/CHANGELOG.md>

#### What's Changed

- chore: bump runner version to 5.0.2 by
[@&#8203;github-actions](https://redirect.github.com/github-actions)\[bot]
in [#&#8203;230](https://redirect.github.com/CodSpeedHQ/action/pull/230)

**Full Changelog**:
<https://github.com/CodSpeedHQ/action/compare/v5.0.2...v5.0.3>

</details>

<details>
<summary>cross-platform-actions/action
(cross-platform-actions/action)</summary>

###
[`v1.4.0`](https://redirect.github.com/cross-platform-actions/action/releases/tag/v1.4.0):
Cross Platform Action 1.4.0

[Compare
Source](https://redirect.github.com/cross-platform-actions/action/compare/v1.3.0...v1.4.0)

##### Added

- Add support for FreeBSD on RISC-V 64 (`riscv64`)
([#&#8203;36](https://redirect.github.com/cross-platform-actions/action/issues/36))
- Add support for NetBSD on VAX, running on the SIMH simulator
- Add support for NetBSD 11.0
([#&#8203;154](https://redirect.github.com/cross-platform-actions/action/issues/154))

##### Changed

- OpenBSD on ARM64 now boots with the same EDK II UEFI firmware
(`uefi.fd`) as
every other ARM64 guest, instead of a separate Linaro UEFI build. The
QEMU
machine type for OpenBSD on ARM64 is now `virt,acpi=off`, which makes
the
kernel fall back to the device tree instead of hanging during ACPI
attach.
This removes the dependency on the Linaro release server, which no
longer
  exists

##### Fixed

- Don't log the `Tearing down VM` group when `shutdown_vm` is `false`,
since
  the VM is not being torn down in that case

([#&#8203;109](https://redirect.github.com/cross-platform-actions/action/issues/109))
- The "Start VM" step could keep running for hours when the VM failed to
boot

([#&#8203;158](https://redirect.github.com/cross-platform-actions/action/issues/158)).
Waiting for the VM to become ready is now bounded by an actual wall
clock
timeout, instead of by a number of connection attempts, and a single SSH
  connection attempt is bounded by `ConnectTimeout`.
- The post job step now reports when the console log of the VM is
missing or
  empty, instead of silently printing nothing

([#&#8203;158](https://redirect.github.com/cross-platform-actions/action/issues/158))
- A reboot of a guest that dies instead of rebooting now fails after
roughly
20 seconds, instead of after 13 minutes. The SSH session that issues the
reboot is bounded by `ServerAliveInterval`, so it no longer blocks for
the
full TCP retransmission time, and waiting for the VM to come back up is
given up on as soon as the guest announces a kernel panic on its serial
  console
- Advanced Matrix Extensions (AMX) is no longer exposed to the guests on
x86-64, so which runner a job happens to get no longer decides whether
the
  VM boots

([#&#8203;158](https://redirect.github.com/cross-platform-actions/action/issues/158)).
Kernels released before AMX existed fault as soon as userland starts,
which
affected NetBSD 9.4 and 10.1 and FreeBSD 12.4 on the runners that have
it

</details>

<details>
<summary>taiki-e/install-action (taiki-e/install-action)</summary>

###
[`v2.85.13`](https://redirect.github.com/taiki-e/install-action/releases/tag/v2.85.13):
2.85.13

[Compare
Source](https://redirect.github.com/taiki-e/install-action/compare/v2.85.12...v2.85.13)

- Update `tombi@latest` to 1.3.3.

- Update `mise@latest` to 2026.8.5.

- Update `kingfisher@latest` to 1.113.0.

- Update `cargo-shear@latest` to 1.13.4.

- Update `bpf-linker@latest` to 0.11.0.

###
[`v2.85.12`](https://redirect.github.com/taiki-e/install-action/releases/tag/v2.85.12):
2.85.12

[Compare
Source](https://redirect.github.com/taiki-e/install-action/compare/v2.85.11...v2.85.12)

- Update `zola@latest` to 0.23.3.

- Update `wasm-tools@latest` to 1.256.0.

- Update `tombi@latest` to 1.2.10.

- Update `syft@latest` to 1.51.0.

- Update `prek@latest` to 0.4.13.

- Update `mise@latest` to 2026.8.4.

- Update `editorconfig-checker@latest` to 3.11.1.

- Update `cargo-tarpaulin@latest` to 0.37.1.

- Update `cargo-rdme@latest` to 2.2.1.

- Update `biome@latest` to 2.5.8.

###
[`v2.85.11`](https://redirect.github.com/taiki-e/install-action/releases/tag/v2.85.11):
2.85.11

[Compare
Source](https://redirect.github.com/taiki-e/install-action/compare/v2.85.10...v2.85.11)

- Update `zola@latest` to 0.23.2.

- Update `wasm-bindgen@latest` to 0.2.127.

- Update `uv@latest` to 0.12.3.

- Update `osv-scanner@latest` to 2.5.0.

- Update `mise@latest` to 2026.8.3.

- Update `kingfisher@latest` to 1.112.0.

- Update `editorconfig-checker@latest` to 3.10.0.

###
[`v2.85.10`](https://redirect.github.com/taiki-e/install-action/releases/tag/v2.85.10):
2.85.10

[Compare
Source](https://redirect.github.com/taiki-e/install-action/compare/v2.85.9...v2.85.10)

- Update `uv@latest` to 0.12.2.

- Update `tombi@latest` to 1.2.7.

- Update `cosign@latest` to 3.1.3.

- Update `coreutils@latest` to 0.10.0.

- Update `cargo-rdme@latest` to 2.2.0.

- Update `cargo-crap@latest` to 0.4.3.

</details>

---

### Configuration

📅 **Schedule**: (in timezone Asia/Shanghai)

- Branch creation
  - "before 10am on monday"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/oxc-project/oxc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yOS41IiwidXBkYXRlZEluVmVyIjoiNDQuMjkuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-16 17:08:56 +00:00

755 lines
32 KiB
YAML

name: CI
permissions: {}
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
merge_group:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
env:
INSTA_REQUIRE_FULL_MATCH: 1
jobs:
test-ubuntu:
name: Test Linux
runs-on: namespace-profile-linux-x64-default
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: oxc-project/setup-node@d59b270414aa7d0eed947eed4eb5b0b8a675f01d # v1.4.0
- uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
with:
path: |
/home/runner/.rustup
./crates/oxc_formatter_tests/prettier
cache: |
rust
pnpm
- run: cargo ck
- run: cargo test --all-features
- run: git diff --exit-code # Must commit everything
test-ubuntu-aarch64:
if: ${{ github.ref_name == 'main' }}
name: Test Linux ARM64
runs-on: ubuntu-24.04-arm
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: oxc-project/setup-node@d59b270414aa7d0eed947eed4eb5b0b8a675f01d # v1.4.0
- uses: oxc-project/setup-rust@3d6fb132fbe7cdcb66bf8ec193911c2945369d12 # v1.0.17
with:
save-cache: ${{ github.ref_name == 'main' }}
cache-key: warm-aarch64
- run: cargo ck
- run: cargo test --all-features
- run: git diff --exit-code # Must commit everything
test-mac: # Separate job to save a job on PRs
if: ${{ github.ref_name == 'main' }}
name: Test Mac
runs-on: namespace-profile-mac-default
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: oxc-project/setup-node@d59b270414aa7d0eed947eed4eb5b0b8a675f01d # v1.4.0
# `cache: pnpm` is intentionally omitted. On Mac OS, `cache: pnpm` replaces the pnpm store directory
# (`~/setup-pnpm/node_modules/.bin/store/v11`) with a symlink into the Namespace cache volume.
# But `oxc-project/setup-node` also caches that same path via `actions/cache`, and at job end
# `tar` archives the symlink record itself rather than the store contents - producing a faulty cache.
# `actions/cache` already handles pnpm correctly here, only `rust` needs the NS volume.
# Note: On Linux this action uses bind-mounts, which don't have this problem - it's a Mac OS problem only.
- uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
with:
cache: rust
- run: cargo ck
- run: cargo test --all-features
- run: git diff --exit-code # Must commit everything
test-windows:
if: ${{ github.ref_name == 'main' }}
name: Test Windows
runs-on: windows-latest
steps:
- run: git config --system core.longpaths true
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
# Unsung heroes of the internet, who led me here to speed up Windows' slowness:
# https://github.com/actions/cache/issues/752#issuecomment-1847036770
# https://github.com/astral-sh/uv/blob/502e04200d52de30d3159894833b3db4f0d6644d/.github/workflows/ci.yml#L158
- uses: oxc-project/setup-node@d59b270414aa7d0eed947eed4eb5b0b8a675f01d # v1.4.0
- uses: samypr100/setup-dev-drive@562171fe8df7401fdf582d766cd3b6ab80d5b1a0 # v4.1.0
with:
workspace-copy: true
drive-size: 12GB
drive-format: ReFS
env-mapping: |
CARGO_HOME,{{ DEV_DRIVE }}/.cargo
RUSTUP_HOME,{{ DEV_DRIVE }}/.rustup
- name: Install Rust
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
shell: bash
run: |
# This `awk` command will find the value of our Minimum Supported Rust Version and store it as `MSRV`.
# NOTE: this will fail if there are any other items named `rust-version`. We assume there is only one in our `Cargo.toml`.
MSRV=$(awk -F'=' '/rust-version/ {gsub(/[" ]/, "", $2); printf "%s", ($2 + "")}' Cargo.toml)
# Set profile to minimal and channel to our Minimum Supported Rust Version.
# Running our tests on this channel ensures that our code uses APIs that are supported in our `MSRV`.
sed -i -e 's/profile = "default"/profile = "minimal"/g' -e "s/channel = .*/channel = \"$MSRV\"/g" rust-toolchain.toml
rustup set profile minimal
rustup show
git restore .
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
workspaces: ${{ env.DEV_DRIVE_WORKSPACE }}
save-if: ${{ github.ref_name == 'main' }}
shared-key: windows-latest
- name: Run tests
# No need for `cargo ck` because it's already checked in linux
# Run `website` tests separately to avoid feature unification problems with `oxlint`
run: cargo test --all-features
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
shell: bash
test-big-endian:
if: ${{ github.ref_name == 'main' }}
name: Test big-endian # s390x-unknown-linux-gnu is a big-endian
runs-on: namespace-profile-linux-x64-default
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
with:
path: /home/runner/.rustup
cache: rust
- uses: taiki-e/install-action@82cd3e7658a6f96c86c0234aeeda1748937cb0a1 # v2.85.13
with:
tool: cross
# `--lib --bins --tests` to skip doctests which are very slow to run via `cross`.
# https://github.com/cross-rs/cross/issues/1703
# `--skip prettier_conformance`: suite provisioning needs curl/tar, absent in the cross container
- run: cross test --lib --bins --tests --all-features --target s390x-unknown-linux-gnu -- --skip prettier_conformance
test-32bit:
if: ${{ github.ref_name == 'main' }}
name: Test 32-bit # armv7-unknown-linux-gnueabihf is a 32-bit target
runs-on: namespace-profile-linux-x64-default
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
with:
path: /home/runner/.rustup
cache: rust
- uses: taiki-e/install-action@82cd3e7658a6f96c86c0234aeeda1748937cb0a1 # v2.85.13
with:
tool: cross
# `--lib --bins --tests` to skip doctests which are very slow to run via `cross`.
# https://github.com/cross-rs/cross/issues/1703
# `--skip prettier_conformance`: suite provisioning needs curl/tar, absent in the cross container
- run: cross test --workspace --lib --bins --tests --all-features --exclude oxc_language_server --exclude oxc_linter --exclude oxlint --target armv7-unknown-linux-gnueabihf -- --skip prettier_conformance
test-wasm32-wasip1-threads:
name: Test wasm32-wasip1-threads
runs-on: namespace-profile-linux-x64-default
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: ./.github/actions/check-changes
id: filter
with:
exclude: oxc_linter
paths: napi/,npm/,apps/,pnpm-lock.yaml,package.json
token: ${{ secrets.GITHUB_TOKEN }}
pr-number: ${{ github.event.pull_request.number }}
- uses: oxc-project/setup-node@d59b270414aa7d0eed947eed4eb5b0b8a675f01d # v1.4.0
if: steps.filter.outputs.changed == 'true'
- uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
if: steps.filter.outputs.changed == 'true'
with:
path: /home/runner/.rustup
cache: |
rust
pnpm
- name: Build
if: steps.filter.outputs.changed == 'true'
run: |
rustup target add wasm32-wasip1-threads
pnpm run build-wasm-dev
git diff --exit-code # Must commit everything
- name: Test wasi in browser
if: steps.filter.outputs.changed == 'true'
working-directory: napi/parser
run: |
rm -rf *.wasm
pnpm exec playwright install chromium
pnpm run build-wasi
pnpm run build-wasm-dev
pnpm run build-npm-dir
pnpm run test-browser
pnpm build-browser-bundle --npmDir npm-dir
test-napi-compiler:
name: Test NAPI Compiler
runs-on: namespace-profile-linux-x64-default
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: ./.github/actions/check-changes
id: filter
with:
exclude: oxc_linter,oxc_language_server
paths: napi/parser/,napi/minify/,napi/transform/,napi/transform-react/,napi/transform-relay/,npm/oxc-types/,npm/runtime/,tasks/e2e/,pnpm-lock.yaml,package.json
token: ${{ secrets.GITHUB_TOKEN }}
pr-number: ${{ github.event.pull_request.number }}
- uses: oxc-project/setup-node@d59b270414aa7d0eed947eed4eb5b0b8a675f01d # v1.4.0
if: steps.filter.outputs.changed == 'true'
- uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
if: steps.filter.outputs.changed == 'true'
with:
path: /home/runner/.rustup
cache: |
rust
pnpm
- uses: ./.github/actions/clone-submodules
if: steps.filter.outputs.changed == 'true'
with:
babel: false
node-compat-table: false
- if: steps.filter.outputs.changed == 'true'
name: Run tests
env:
RUN_RAW_RANGE_TESTS: "true"
RUN_RAW_TOKENS_TESTS: "true"
run: |
pnpm --workspace-concurrency=1 --filter "./napi/parser" --filter "./napi/minify" --filter "./napi/transform" --filter "./napi/transform-react" --filter "./napi/transform-relay" build-test
pnpm --workspace-concurrency=1 --filter "./napi/parser" --filter "./napi/minify" --filter "./napi/transform" --filter "./napi/transform-react" --filter "./napi/transform-relay" test
- if: steps.filter.outputs.changed == 'true'
name: Run e2e tests
working-directory: tasks/e2e
run: pnpm run test
- if: steps.filter.outputs.changed == 'true'
run: |
git diff --exit-code # Must commit everything
test-napi-shared:
name: Test NAPI Shared
runs-on: namespace-profile-linux-x64-default
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: ./.github/actions/check-changes
id: filter
with:
paths: apps/shared/,pnpm-lock.yaml,package.json
token: ${{ secrets.GITHUB_TOKEN }}
pr-number: ${{ github.event.pull_request.number }}
- uses: oxc-project/setup-node@d59b270414aa7d0eed947eed4eb5b0b8a675f01d # v1.4.0
if: steps.filter.outputs.changed == 'true'
- uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
if: steps.filter.outputs.changed == 'true'
with:
path: /home/runner/.rustup
cache: |
pnpm
- if: steps.filter.outputs.changed == 'true'
name: Run tests
run: pnpm --filter "@oxapps/shared" test
test-napi-oxlint:
name: Test NAPI Oxlint
runs-on: namespace-profile-linux-x64-default
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: ./.github/actions/check-changes
id: filter
with:
paths: apps/oxlint/,apps/shared/,npm/oxlint/,npm/oxlint-plugin-eslint/,npm/oxlint-plugins/,npm/oxc-types/,crates/oxc_config/,pnpm-lock.yaml,package.json
token: ${{ secrets.GITHUB_TOKEN }}
pr-number: ${{ github.event.pull_request.number }}
- uses: oxc-project/setup-node@d59b270414aa7d0eed947eed4eb5b0b8a675f01d # v1.4.0
if: steps.filter.outputs.changed == 'true'
- uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
if: steps.filter.outputs.changed == 'true'
with:
path: /home/runner/.rustup
cache: |
rust
pnpm
- if: steps.filter.outputs.changed == 'true'
name: Run tests
run: |
pnpm --filter "./apps/oxlint" build-test
pnpm --filter "./apps/oxlint" test
- if: steps.filter.outputs.changed == 'true'
run: |
git diff --exit-code # Must commit everything
test-napi-oxfmt:
name: Test NAPI Oxfmt
runs-on: namespace-profile-linux-x64-default
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: ./.github/actions/check-changes
id: filter
with:
paths: apps/oxfmt/,apps/shared/,npm/oxfmt/,crates/oxc_formatter/,crates/oxc_formatter_core/,crates/oxc_formatter_css/,crates/oxc_formatter_graphql/,crates/oxc_formatter_json/,crates/oxc_formatter_yaml/,crates/oxc_config/,pnpm-lock.yaml,package.json
token: ${{ secrets.GITHUB_TOKEN }}
pr-number: ${{ github.event.pull_request.number }}
- uses: ./.github/actions/check-changes
id: filter-conformance
with:
paths: apps/oxfmt/,npm/oxfmt/,crates/oxc_formatter/,crates/oxc_formatter_core/,crates/oxc_formatter_css/,crates/oxc_formatter_graphql/,crates/oxc_formatter_json/,crates/oxc_formatter_yaml/,pnpm-lock.yaml,package.json
token: ${{ secrets.GITHUB_TOKEN }}
pr-number: ${{ github.event.pull_request.number }}
- uses: oxc-project/setup-node@d59b270414aa7d0eed947eed4eb5b0b8a675f01d # v1.4.0
if: steps.filter.outputs.changed == 'true' || steps.filter-conformance.outputs.changed == 'true'
- uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
if: steps.filter.outputs.changed == 'true'
with:
path: /home/runner/.rustup
cache: |
rust
pnpm
- if: steps.filter.outputs.changed == 'true'
name: Run tests
run: |
pnpm --filter "./apps/oxfmt" build-test
pnpm --filter "./apps/oxfmt" test
# Conformance ---
- uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
if: steps.filter-conformance.outputs.changed == 'true'
with:
# Warm fixtures skip download entirely (`.version` stamps in download-fixtures.js)
path: ./apps/oxfmt/conformance/fixtures/externals
- if: steps.filter-conformance.outputs.changed == 'true'
name: Download conformance fixtures
run: pnpm --filter "./apps/oxfmt" download-fixtures
- if: steps.filter-conformance.outputs.changed == 'true'
name: Run conformance tests
run: pnpm --filter "./apps/oxfmt" conformance
# --- Conformance
- if: steps.filter.outputs.changed == 'true' || steps.filter-conformance.outputs.changed == 'true'
run: |
git diff --exit-code # Must commit everything
test-napi-compiler-windows:
name: Test NAPI Compiler (windows)
runs-on: windows-latest
if: ${{ github.ref_name == 'main' }}
steps:
- run: git config --system core.longpaths true
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: ./.github/actions/check-changes
id: filter
with:
exclude: oxc_linter,oxc_language_server
paths: napi/parser/,napi/minify/,napi/transform/,napi/transform-react/,napi/transform-relay/,npm/oxc-types/,npm/runtime/,tasks/e2e/,pnpm-lock.yaml,package.json
token: ${{ secrets.GITHUB_TOKEN }}
pr-number: ${{ github.event.pull_request.number }}
- uses: oxc-project/setup-node@d59b270414aa7d0eed947eed4eb5b0b8a675f01d # v1.4.0
if: steps.filter.outputs.changed == 'true'
- uses: samypr100/setup-dev-drive@562171fe8df7401fdf582d766cd3b6ab80d5b1a0 # v4.1.0
if: steps.filter.outputs.changed == 'true'
with:
workspace-copy: true
drive-size: 12GB
drive-format: ReFS
env-mapping: |
CARGO_HOME,{{ DEV_DRIVE }}/.cargo
RUSTUP_HOME,{{ DEV_DRIVE }}/.rustup
- uses: oxc-project/setup-rust@3d6fb132fbe7cdcb66bf8ec193911c2945369d12 # v1.0.17
if: steps.filter.outputs.changed == 'true'
with:
cache-key: napi
save-cache: ${{ github.ref_name == 'main' }}
- uses: ./.github/actions/clone-submodules
if: steps.filter.outputs.changed == 'true'
with:
babel: false
node-compat-table: false
- if: steps.filter.outputs.changed == 'true'
name: Run tests
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
env:
RUN_RAW_RANGE_TESTS: "true"
run: |
pnpm --workspace-concurrency=1 --filter "./napi/parser" --filter "./napi/minify" --filter "./napi/transform" --filter "./napi/transform-react" --filter "./napi/transform-relay" build-test
pnpm --workspace-concurrency=1 --filter "./napi/parser" --filter "./napi/minify" --filter "./napi/transform" --filter "./napi/transform-react" --filter "./napi/transform-relay" test
- if: steps.filter.outputs.changed == 'true'
name: Run e2e tests
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}/tasks/e2e
run: |
pnpm install --frozen-lockfile
pnpm run test
- if: steps.filter.outputs.changed == 'true'
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
run: |
git diff --exit-code # Must commit everything
test-napi-oxlint-windows:
name: Test NAPI Oxlint (windows)
runs-on: windows-latest
if: ${{ github.ref_name == 'main' }}
steps:
- run: git config --system core.longpaths true
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: ./.github/actions/check-changes
id: filter
with:
paths: apps/oxlint/,apps/shared/,npm/oxlint/,npm/oxlint-plugin-eslint/,npm/oxlint-plugins/,npm/oxc-types/,crates/oxc_config/,pnpm-lock.yaml,package.json
token: ${{ secrets.GITHUB_TOKEN }}
pr-number: ${{ github.event.pull_request.number }}
- uses: oxc-project/setup-node@d59b270414aa7d0eed947eed4eb5b0b8a675f01d # v1.4.0
if: steps.filter.outputs.changed == 'true'
- uses: samypr100/setup-dev-drive@562171fe8df7401fdf582d766cd3b6ab80d5b1a0 # v4.1.0
if: steps.filter.outputs.changed == 'true'
with:
workspace-copy: true
drive-size: 12GB
drive-format: ReFS
env-mapping: |
CARGO_HOME,{{ DEV_DRIVE }}/.cargo
RUSTUP_HOME,{{ DEV_DRIVE }}/.rustup
- uses: oxc-project/setup-rust@3d6fb132fbe7cdcb66bf8ec193911c2945369d12 # v1.0.17
if: steps.filter.outputs.changed == 'true'
with:
cache-key: napi
save-cache: ${{ github.ref_name == 'main' }}
- if: steps.filter.outputs.changed == 'true'
name: Run tests
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
run: |
pnpm --filter "./apps/oxlint" build-test
pnpm --filter "./apps/oxlint" test
- if: steps.filter.outputs.changed == 'true'
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
run: |
git diff --exit-code # Must commit everything
test-napi-oxfmt-windows:
name: Test NAPI Oxfmt (windows)
runs-on: windows-latest
if: ${{ github.ref_name == 'main' }}
steps:
- run: git config --system core.longpaths true
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: ./.github/actions/check-changes
id: filter
with:
paths: apps/oxfmt/,apps/shared/,npm/oxfmt/,crates/oxc_formatter/,crates/oxc_formatter_core/,crates/oxc_formatter_css/,crates/oxc_formatter_graphql/,crates/oxc_formatter_json/,crates/oxc_formatter_yaml/,crates/oxc_config/,pnpm-lock.yaml,package.json
token: ${{ secrets.GITHUB_TOKEN }}
pr-number: ${{ github.event.pull_request.number }}
- uses: oxc-project/setup-node@d59b270414aa7d0eed947eed4eb5b0b8a675f01d # v1.4.0
if: steps.filter.outputs.changed == 'true'
- uses: samypr100/setup-dev-drive@562171fe8df7401fdf582d766cd3b6ab80d5b1a0 # v4.1.0
if: steps.filter.outputs.changed == 'true'
with:
workspace-copy: true
drive-size: 12GB
drive-format: ReFS
env-mapping: |
CARGO_HOME,{{ DEV_DRIVE }}/.cargo
RUSTUP_HOME,{{ DEV_DRIVE }}/.rustup
- uses: oxc-project/setup-rust@3d6fb132fbe7cdcb66bf8ec193911c2945369d12 # v1.0.17
if: steps.filter.outputs.changed == 'true'
with:
cache-key: napi
save-cache: ${{ github.ref_name == 'main' }}
- if: steps.filter.outputs.changed == 'true'
name: Run tests
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
run: |
pnpm --filter "./apps/oxfmt" build-test
pnpm --filter "./apps/oxfmt" test
- if: steps.filter.outputs.changed == 'true'
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
run: |
git diff --exit-code # Must commit everything
typos:
name: Spell Check
runs-on: ubuntu-slim
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: crate-ci/typos@8a48f81b6c64dcfea44b3633223084c4be58ac5f # v1.49.0
with:
files: .
lint:
name: Lint
runs-on: namespace-profile-linux-x64-default
env:
CARGO_BUILD_WARNINGS: deny
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: oxc-project/setup-node@d59b270414aa7d0eed947eed4eb5b0b8a675f01d # v1.4.0
- uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
with:
path: /home/runner/.rustup
cache: |
rust
pnpm
- run: rustup component add clippy
- run: cargo lint
# Catch lints which only fire with `debug_assertions` off (i.e. release mode),
# e.g. code becoming unused when a `#[cfg(debug_assertions)]` block vanishes.
# Main-only and without `--all-targets`: these failures are rare and a post-merge
# failure pinpoints the culprit commit, so not worth doubling clippy time on every PR.
# `--all-targets` is omitted because test/bench code is never built in release mode
# with warnings denied.
- if: ${{ github.ref_name == 'main' }}
run: cargo clippy --all-features --profile dev-no-debug-assertions
- run: pnpm --filter oxlint-app build-js
- run: pnpm --filter oxfmt-app build-js
- run: pnpm --filter oxc-codegen build
- run: node --run lint
doc:
name: Doc
runs-on: namespace-profile-linux-x64-default
env:
# FIXME(ci): Unpin once rust-lang/rust#154878 is resolved.
TOOLCHAIN: nightly-2026-04-01
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
with:
path: /home/runner/.rustup
cache: rust
- run: rustup toolchain install "${TOOLCHAIN}" --profile minimal --component rust-docs
# https://github.com/rust-lang/rust/issues/146895
- run: RUSTDOCFLAGS='-D warnings' cargo +"${TOOLCHAIN}" doc --no-deps --document-private-items --all-features -Zrustdoc-mergeable-info
conformance:
name: Conformance
runs-on: namespace-profile-linux-x64-default
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- name: Check if conformance should run
id: filter
uses: ./.github/actions/check-changes
with:
packages: oxc_coverage,oxc_transform_conformance
paths: tasks/coverage/,tasks/common/,tasks/transform_conformance/,pnpm-lock.yaml
token: ${{ secrets.GITHUB_TOKEN }}
pr-number: ${{ github.event.pull_request.number }}
- uses: ./.github/actions/clone-submodules
if: steps.filter.outputs.changed == 'true'
with:
node-compat-table: false
- uses: oxc-project/setup-node@d59b270414aa7d0eed947eed4eb5b0b8a675f01d # v1.4.0
if: steps.filter.outputs.changed == 'true'
- uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
if: steps.filter.outputs.changed == 'true'
with:
path: /home/runner/.rustup
cache: |
rust
pnpm
- uses: taiki-e/install-action@82cd3e7658a6f96c86c0234aeeda1748937cb0a1 # v2.85.13
if: steps.filter.outputs.changed == 'true'
with:
tool: just
- name: Check Conformance
if: steps.filter.outputs.changed == 'true'
run: |
just update-transformer-fixtures
just coverage
git diff --exit-code
test-codegen:
name: Test Codegen
runs-on: namespace-profile-linux-x64-default
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- name: Check if codegen tests should run
id: filter
uses: ./.github/actions/check-changes
with:
packages: oxc_codegen_conformance,oxc_parser_napi
paths: .github/workflows/ci.yml,packages/codegen/,tasks/codegen_conformance/,napi/parser/,npm/oxc-types/,tasks/coverage/,pnpm-lock.yaml,pnpm-workspace.yaml,package.json
token: ${{ secrets.GITHUB_TOKEN }}
pr-number: ${{ github.event.pull_request.number }}
- uses: ./.github/actions/clone-submodules
if: steps.filter.outputs.changed == 'true'
with:
node-compat-table: false
- uses: oxc-project/setup-node@d59b270414aa7d0eed947eed4eb5b0b8a675f01d # v1.4.0
if: steps.filter.outputs.changed == 'true'
- uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
if: steps.filter.outputs.changed == 'true'
with:
path: /home/runner/.rustup
cache: |
rust
pnpm
- name: Run codegen tests
if: steps.filter.outputs.changed == 'true'
run: |
pnpm --filter oxc-codegen build-test
pnpm --filter oxc-codegen test
git diff --exit-code
minification:
name: Minification Size
runs-on: namespace-profile-linux-x64-default
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: ./.github/actions/check-changes
id: filter
with:
packages: oxc_minsize
token: ${{ secrets.GITHUB_TOKEN }}
pr-number: ${{ github.event.pull_request.number }}
- uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
with:
path: /home/runner/.rustup
cache: rust
- name: Check minification size
if: steps.filter.outputs.changed == 'true'
run: |
cargo minsize
git diff --exit-code
# Write a human-readable diff of the minified output vs the base branch
# to the job summary for review (same flow as `just minifier-diff`).
- name: Diff minify output
if: ${{ !cancelled() && steps.filter.outputs.changed == 'true' && github.event_name == 'pull_request' }}
env:
BASE_REF: ${{ github.event.pull_request.base.ref }}
run: |
cargo minsize --compress-only pr
git fetch --depth 1 origin "$BASE_REF"
git checkout -f FETCH_HEAD
cargo minsize --compress-only main
echo '# Minify Output Diff' >> "$GITHUB_STEP_SUMMARY"
changed=false
for pr_file in target/minifier/pr/*.js; do
name=$(basename "$pr_file")
if ! diff -uN "target/minifier/main/$name" "$pr_file" > /tmp/minify.diff; then
changed=true
{
echo "## $name"
echo '```diff'
head -n 200 /tmp/minify.diff
if [ "$(wc -l < /tmp/minify.diff)" -gt 200 ]; then echo '... (truncated)'; fi
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
fi
done
if [ "$changed" = false ]; then
echo 'No difference in compress-only output compared to the base branch.' >> "$GITHUB_STEP_SUMMARY"
fi
allocs:
name: Allocations
runs-on: namespace-profile-linux-x64-default
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: ./.github/actions/check-changes
id: filter
with:
packages: oxc_track_memory_allocations
paths: tasks/track_memory_allocations/
token: ${{ secrets.GITHUB_TOKEN }}
pr-number: ${{ github.event.pull_request.number }}
- uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
with:
path: /home/runner/.rustup
cache: rust
- name: Check allocations
if: steps.filter.outputs.changed == 'true'
run: |
cargo allocs
git diff --exit-code ||
(echo 'Allocations have changed. Run the `cargo allocs` command to update the allocation snapshot, otherwise please fix the regression.' && exit 1)
ast_changes:
name: AST Changes
runs-on: namespace-profile-linux-x64-default
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
id: filter
with:
filters: ".github/generated/ast_changes_watch_list.yml"
- uses: oxc-project/setup-node@d59b270414aa7d0eed947eed4eb5b0b8a675f01d # v1.4.0
if: steps.filter.outputs.src == 'true'
- uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
if: steps.filter.outputs.src == 'true'
with:
path: /home/runner/.rustup
cache: |
rust
pnpm
- run: rustup component add rustfmt
if: steps.filter.outputs.src == 'true'
- name: Check AST Changes
if: steps.filter.outputs.src == 'true'
run: |
cargo run -p oxc_ast_tools
git diff --exit-code ||
(echo 'AST changes caused the "generated" code to get outdated. Have you forgotten to run the `just ast` command and/or commit generated codes?' && exit 1)
lintgen:
name: Linter changes
runs-on: namespace-profile-linux-x64-default
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: ./.github/actions/check-changes
id: filter
with:
packages: oxc_linter,oxc_track_linter_timings
paths: tasks/linter_codegen/,tasks/track_linter_timings/,npm/oxlint/configuration_schema.json,apps/oxlint/src-js/package/config.generated.ts,apps/oxlint/scripts/generate-config-types.ts,apps/oxlint/package.json,pnpm-lock.yaml,package.json
token: ${{ secrets.GITHUB_TOKEN }}
pr-number: ${{ github.event.pull_request.number }}
- uses: oxc-project/setup-node@d59b270414aa7d0eed947eed4eb5b0b8a675f01d # v1.4.0
if: steps.filter.outputs.changed == 'true'
- uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
if: steps.filter.outputs.changed == 'true'
with:
path: /home/runner/.rustup
cache: |
rust
pnpm
- run: rustup component add rustfmt
if: steps.filter.outputs.changed == 'true'
- name: Check linter changes
if: steps.filter.outputs.changed == 'true'
run: |
cargo lintgen
pnpm --filter oxlint-app generate-config-types
cargo lint-timings
git diff --exit-code ||
(echo 'Linter generated files or timing snapshots have changed. Run `cargo lintgen`, `just linter-schema-json`, `just linter-config-ts`, and `cargo lint-timings`, then commit the generated files.' && exit 1)