Skip to content

chore: Limit CI workflow trigger paths #18

chore: Limit CI workflow trigger paths

chore: Limit CI workflow trigger paths #18

Workflow file for this run

name: Rust
on:
push:
branches: ["main"]
paths:
- "src/**"
- "Cargo.toml"
- "Cargo.lock"
- ".github/workflows/ci.yaml"
pull_request:
branches: ["main"]
paths:
- "src/**"
- "Cargo.toml"
- "Cargo.lock"
- ".github/workflows/ci.yaml"
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
include:
- target: linux-amd64
os: ubuntu-latest
cargo_build_target: x86_64-unknown-linux-gnu
runs-on: ${{ matrix.os }}
env:
CARGO_BUILD_TARGET: ${{ matrix.cargo_build_target }}
TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@v5
- uses: r7kamura/rust-problem-matchers@v1
- uses: Swatinem/rust-cache@v2
- name: Build
shell: bash
run: scripts/build_dist.sh ci-run
test:
runs-on: ubuntu-latest
# Token needed for the integration tests using the gh command line
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v5
- uses: r7kamura/rust-problem-matchers@v1
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test
rust-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: r7kamura/rust-problem-matchers@v1
- uses: Swatinem/rust-cache@v2
- name: Run Format
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy --all --all-features -- -D warnings