name: ci
concurrency:
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
on:
push:
paths-ignore:
- "**.md"
- docs/**
pull_request:
paths-ignore:
- "**.md"
- docs/**
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -C debuginfo=0 RUST_BACKTRACE: 1
jobs:
build:
name: Build and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [linux]
include:
- build: linux
os: ubuntu-latest
rust: stable
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache Rust
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run tests
run: |
df -h .
cargo clean
cargo test --verbose