name: CI
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
pull-requests: write
issues: write
id-token: write
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Clippy and Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
persist-credentials: false
fetch-depth: 0
- name: Install stable Rust
run: |
rustup toolchain install stable --profile minimal --component clippy,llvm-tools --no-self-update
rustup default stable
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov
- name: Validate direct-codegen fixtures
run: node tools/grammar-frontend/validate-interp-fixtures.mjs
- name: Run Clippy
run: cargo clippy --locked --all-targets --all-features -- -D warnings
- name: Run unit tests with coverage
run: cargo llvm-cov --locked --all-features --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v7
with:
files: lcov.info
flags: unittests
use_oidc: true
fail_ci_if_error: false
disable_search: true
- uses: ophi-dev/mehen@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
paths: |
src