Skip to content

chore(CI): tigger CI on merge_group events (#18) #30

chore(CI): tigger CI on merge_group events (#18)

chore(CI): tigger CI on merge_group events (#18) #30

Workflow file for this run

name: Rust

Check failure on line 1 in .github/workflows/rust.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/rust.yml

Invalid workflow file

(Line: 8, Col: 16): A sequence was not expected
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
merge_group: [checks_requested]
env:
CARGO_TERM_COLOR: always
# https://github.com/xd009642/tarpaulin
TARPAULIN_VERSION: 0.35.1
# https://github.com/est31/cargo-udeps
UDEPS_VERSION: 0.1.60
# https://github.com/rustsec/rustsec
AUDIT_VERSION: 0.22.1
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
linter:
runs-on: ubuntu-latest
name: Cargo fmt and clippy
steps:
- uses: actions/checkout@v4
- name: Check formatting
run: cargo fmt --all -- --check
tests:
runs-on: ubuntu-latest
name: Cargo test and tarpaulin
needs: linter
steps:
- uses: actions/checkout@v4
- name: Install cargo-tarpaulin@${{ env.TARPAULIN_VERSION }}
run: cargo install cargo-tarpaulin@${{ env.TARPAULIN_VERSION }} --locked
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Run tarpaulin
run: cargo tarpaulin --verbose
audit:
runs-on: ubuntu-latest
name: Cargo udeps and audit
needs: linter
steps:
- uses: actions/checkout@v4
- name: Install cargo-udeps
run: cargo install cargo-udeps@${{ env.UDEPS_VERSION }} --locked
- name: Install cargo-audit
run: cargo install cargo-audit@${{ env.AUDIT_VERSION }} --locked
- name: Run cargo udeps
run: cargo +nightly udeps --verbose
- name: Run cargo audit
run: cargo audit