fix(deps): update rust crate oxc_ast_visit to 0.148 #178
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| # zizmor's `concurrency-limits` rule: cancel any in-flight run for the | |
| # same branch / PR when a new commit lands. Saves CI minutes on | |
| # rapid-fire pushes and prevents stale runs from racing the new one. | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: -D warnings | |
| # Explicit least-privilege permissions for the whole workflow. zizmor's | |
| # `excessive-permissions` rule flags the GITHUB_TOKEN default; we only | |
| # need read access to check out the repo and download the Rust toolchain. | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: test (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| # zizmor's `artipacked` rule: don't let the GITHUB_TOKEN leak | |
| # into any artifact or cache. | |
| persist-credentials: false | |
| - name: Install Rust toolchain | |
| # Pin to a specific stable release so the build is reproducible | |
| # across runs and matches the MSRV in Cargo.toml. The `stable` | |
| # ref would be marked "superfluous" by zizmor because the runner | |
| # already has rustup; pinning to a version is the explicit | |
| # reason to keep the action. | |
| # | |
| # 1.95.0 is the MSRV: every release of `oxc` we use requires | |
| # rustc >= 1.95.0, and Cargo.toml's `rust-version` field | |
| # enforces this on every `cargo` invocation. | |
| uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable | |
| with: | |
| toolchain: 1.95.0 | |
| components: rustfmt, clippy | |
| - name: Cache cargo registry & build | |
| uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 | |
| - name: rustfmt | |
| run: cargo fmt --all -- --check | |
| - name: clippy | |
| run: cargo clippy --all-targets -- -D warnings | |
| # Phase 1 accuracy floor: the parser must never crash on malformed | |
| # input. `unwrap()`/`panic!()` are only allowed in #[cfg(test)] | |
| # code (the `tests.rs` module). This grep gate keeps the invariant | |
| # mechanical; the fuzz seed corpus lands in Phase 8. | |
| - name: parser must not unwrap/panic (production code) | |
| run: | | |
| matches=$(grep -rEn 'unwrap\(|expect\(|panic!|unreachable!|todo!|unimplemented!' \ | |
| src/parser/ --include='*.rs' || true) | |
| matches=$(printf '%s\n' "$matches" | grep -v '/tests.rs' || true) | |
| if [ -n "$matches" ]; then | |
| printf '%s\n' "$matches" | |
| echo "::error::src/parser production code must not unwrap()/panic!(); malformed input is a TemplateError" >&2 | |
| exit 1 | |
| fi | |
| - name: test | |
| run: cargo test --all-features |