mirror of
https://github.com/danbulant/oxc
synced 2026-05-21 21:29:01 +00:00
87 lines
2.1 KiB
YAML
87 lines
2.1 KiB
YAML
name: Ecosystem CI
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
types: [opened, synchronize]
|
|
paths:
|
|
- 'crates/oxc_parser/**'
|
|
- 'crates/oxc_diagnostics/**'
|
|
- 'crates/oxc_cli/**'
|
|
- 'crates/oxc_linter/**'
|
|
- '.github/workflows/ecosystem.yml'
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'crates/oxc_parser/**'
|
|
- 'crates/oxc_diagnostics/**'
|
|
- 'crates/oxc_cli/**'
|
|
- 'crates/oxc_linter/**'
|
|
- '.github/workflows/ecosystem.yml'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
|
cancel-in-progress: ${{ github.ref_name != 'main' }}
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: taiki-e/checkout-action@v1
|
|
|
|
- name: Install Rust
|
|
uses: ./.github/actions/rustup
|
|
with:
|
|
shared-key: oxlint
|
|
save-cache: ${{ github.ref_name == 'main' }}
|
|
|
|
- name: Build oxlint
|
|
run: cargo build --release -p oxc_cli --bin oxlint --features allocator
|
|
|
|
- name: Upload Binary
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
if-no-files-found: error
|
|
name: oxlint
|
|
path: ./target/release/oxlint
|
|
|
|
test:
|
|
name: Test
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- repository: microsoft/vscode
|
|
ref: main
|
|
- repository: DefinitelyTyped/DefinitelyTyped
|
|
ref: master
|
|
steps:
|
|
- name: Clone ${{ matrix.repository }}
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: ${{ matrix.repository }}
|
|
ref: ${{ matrix.ref }}
|
|
path: ./e2e
|
|
|
|
- name: Download Artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: oxlint
|
|
path: .
|
|
|
|
- name: Run oxlint and pipe output to a temp file
|
|
shell: bash
|
|
run: |
|
|
chmod +x ./oxlint
|
|
./oxlint --quiet -D all ./e2e | tee log || true
|
|
|
|
- name: Using grep to check if oxlint panic
|
|
shell: bash
|
|
run: |
|
|
if grep --quiet --ignore-case panic log; then
|
|
exit 1
|
|
fi
|