Files
cassady/.github/workflows/ci.yml
T

53 lines
981 B
YAML

name: CI
on:
push:
paths:
- 'src/**'
- 'tests/**'
- 'docs/**'
- 'plans/**'
- '*.md'
- 'Cargo.toml'
- 'Cargo.lock'
- 'build.rs'
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Build all targets
run: cargo build --locked --all-targets
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --locked --all-targets