diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b481fc0cbb08e..23a53751d1e96 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -196,3 +196,50 @@ jobs: - name: Install Rust uses: ./.github/actions/rustup - run: cargo test --quiet + + conformance: + name: Conformance + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + src: + - '!crates/oxc_linter/**' + + - name: Install Rust Toolchain + if: steps.filter.outputs.src == 'true' + uses: ./.github/actions/rustup + with: + shared-key: 'conformance' + save-cache: ${{ github.ref_name == 'main' }} + + - name: Clone submodules + if: steps.filter.outputs.src == 'true' + uses: ./.github/actions/clone-submodules + + - name: Set up Bun + if: steps.filter.outputs.src == 'true' + uses: oven-sh/setup-bun@v1 + + - name: Install Node.js + if: steps.filter.outputs.src == 'true' + uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: 'https://registry.npmjs.org' + + - name: Install just + if: steps.filter.outputs.src == 'true' + uses: taiki-e/install-action@v2 + with: + tool: just + + - name: Coverage and check diff + if: steps.filter.outputs.src == 'true' + run: | + just coverage + git diff --exit-code diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml deleted file mode 100644 index eab5f7ddfd2a5..0000000000000 --- a/.github/workflows/conformance.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: Conformance - -on: - workflow_dispatch: - pull_request: - types: [opened, synchronize] - paths-ignore: - - '**/*.md' - - '**/*.yml' - - '**/package.json' - - 'npm/**' - - 'website/**' - - 'crates/oxc/**' - - 'crates/oxc_cli/**' - - 'crates/oxc_linter/**' - - 'crates/oxc_type_synthesis/**' - - 'crates/oxc_wasm/**' - - 'crates/oxc_prettier/**' - - 'tasks/prettier_conformance/**' - push: - branches: - - main - paths-ignore: - - '**/*.md' - - '**/*.yml' - - '**/package.json' - - 'npm/**' - - 'website/**' - - 'crates/oxc/**' - - 'crates/oxc_cli/**' - - 'crates/oxc_linter/**' - - 'crates/oxc_type_synthesis/**' - - 'crates/oxc_wasm/**' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: ${{ github.ref_name != 'main' }} - -jobs: - conformance: - name: Conformance - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install Rust Toolchain - uses: ./.github/actions/rustup - - - name: Clone submodules - uses: ./.github/actions/clone-submodules - - - name: Set up Bun - uses: oven-sh/setup-bun@v1 - - - name: Install Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - registry-url: 'https://registry.npmjs.org' - - - name: Install just - uses: taiki-e/install-action@v2 - with: - tool: just - - - name: Coverage - run: just coverage - - - name: Check for snapshot diff - run: git diff --exit-code