Skip to content

chore: Add PR validation workflow #1994

chore: Add PR validation workflow

chore: Add PR validation workflow #1994

Workflow file for this run

name: CI
on:
push:
branches:
- master
- "release/**"
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
env:
RUSTFLAGS: -Dwarnings
jobs:
lints:
name: Run lint checks
uses: ./.github/workflows/lint.yml
check:
name: Check compile errors
uses: ./.github/workflows/check.yml
test:
name: Run tests
uses: ./.github/workflows/test.yml
codecov:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- run: rustup component add llvm-tools-preview
- uses: Swatinem/rust-cache@42dc69e1aa15d09112580998cf2ef0119e2e91ae # v2
- uses: taiki-e/install-action@21eb0b6228fa6252dafdd9c82e7516ad2328c775 # cargo-llvm-cov
- run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info --locked
- uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
doc:
name: Build documentation
uses: ./.github/workflows/doc.yml
required:
name: Check required jobs
runs-on: ubuntu-latest
if: ${{ always() }}
# Keep this list in sync with all CI jobs that should be required.
# `codecov` is intentionally excluded from this aggregator.
needs: [lints, check, test, doc]
steps:
- name: Fail if any required job did not succeed
if: >-
${{
contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'cancelled') ||
contains(needs.*.result, 'skipped')
}}
run: exit 1