Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 63 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:
- name: Docs check
run: pnpm run docs:update && git diff --exit-code README.md

test:
name: Test
test-unit:
name: Test (Unit)
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@83ed61bfbe2b8abbb3c66e8b65b1335484c70009 # v1.4.1
Expand All @@ -55,20 +55,72 @@ jobs:
- run: pnpm install --frozen-lockfile

- name: Compile
run: pnpm run compile
run: pnpm run compile && TEST=true pnpm run compile

- name: Unit Tests
run: xvfb-run -a pnpm run test:unit
env:
TEST_SUITE: unit
run: xvfb-run -a pnpm exec vscode-test

- name: Oxlint LSP Tests
run: xvfb-run -a pnpm run test:oxlint && xvfb-run -a pnpm run test:oxlint-multi-root
- name: Upload compiled output
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
if-no-files-found: error
name: compiled-output
retention-days: 1
path: |
out/
out_test/

- name: Upload VS Code binary
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
if-no-files-found: error
name: vscode-binary
retention-days: 1
path: .vscode-test/

test-integration:
name: Test (${{ matrix.suite.name }})
needs: test-unit
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.suite.continue_on_error }}
strategy:
fail-fast: false
matrix:
suite:
- { name: "Oxlint LSP", test_suite: "oxlint-lsp", continue_on_error: false }
- { name: "Oxlint LSP Multi-Root", test_suite: "oxlint-lsp-multi-root", continue_on_error: false }
- { name: "Oxlint JS Plugin (flaky)", test_suite: "oxlint-js", continue_on_error: true }
- { name: "Oxfmt LSP", test_suite: "oxfmt-lsp", continue_on_error: false }
steps:
- uses: taiki-e/checkout-action@83ed61bfbe2b8abbb3c66e8b65b1335484c70009 # v1.4.1

- name: Oxlint JS Plugin Test (flaky)
continue-on-error: true
run: xvfb-run -a pnpm run test:oxlint-js
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0

- name: Oxfmt LSP Tests
run: xvfb-run -a pnpm run test:oxfmt
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 22
cache: pnpm

- run: pnpm install --frozen-lockfile

- name: Download compiled output
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: compiled-output
path: .

- name: Download VS Code binary
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: vscode-binary
path: .vscode-test/

- name: Run Tests
env:
TEST_SUITE: ${{ matrix.suite.test_suite }}
run: xvfb-run -a pnpm exec vscode-test

test-windows:
if: ${{ github.ref_name == 'main' }}
Expand Down