chore: use a json file #38
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: oxlint ecosystem ci | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
pull_request: | ||
types: [opened, synchronize] | ||
push: | ||
branches: | ||
- main | ||
defaults: | ||
run: | ||
shell: bash | ||
jobs: | ||
build: | ||
name: Build | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout oxc | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: oxc-project/oxc | ||
ref: main | ||
- name: Install Rust | ||
uses: moonrepo/setup-rust@v1 | ||
with: | ||
bins: just | ||
cache-base: main | ||
cache-target: release | ||
- name: Build oxlint | ||
run: just oxlint | ||
- name: Upload Binary | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
if-no-files-found: error | ||
name: oxlint | ||
path: ./target/release/oxlint | ||
checkout: | ||
namme: Checkout | ||
needs: build | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.setmatrix.outputs.matrix }} | ||
steps: | ||
- uses: taiki-e/checkout-action@v1 | ||
- id: setmatrix | ||
run: | | ||
matrix=$(cat ./matrix.json) | ||
echo "::set-output name=matrix::$matrix" | ||
test-ecosystem: | ||
needs: checkout | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: ${{fromJson(needs.checkout.outputs.matrix)}} | ||
name: ${{ matrix.repository }} | ||
steps: | ||
- name: Clone ${{ matrix.repository }} | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ matrix.repository }} | ||
ref: ${{ matrix.ref }} | ||
path: ${{ matrix.path }} | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: oxlint | ||
path: ${{ matrix.path }} | ||
- name: chmod +x oxlint | ||
run: chmod +x ./oxlint | ||
working-directory: ${{ matrix.path }} | ||
- name: Run | ||
working-directory: ${{ matrix.path }} | ||
run: ${{ matrix.command }} |