Starlight/.forgejo/workflows/cargo_test.yml

41 lines
938 B
YAML
Raw Normal View History

2024-12-12 19:31:08 -08:00
name: Test
2024-12-12 19:09:26 -08:00
on:
push:
branches: ["*"]
pull_request:
branches: ["*"]
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
2024-12-12 19:09:26 -08:00
steps:
2024-12-12 19:33:33 -08:00
- name: Checkout Repository
uses: actions/checkout@v4
2024-12-12 19:09:26 -08:00
2024-12-12 19:33:33 -08:00
- name: Cache dependencies
uses: actions/cache@v2
2024-12-12 19:33:33 -08:00
with:
2024-12-12 19:20:46 -08:00
path: |
target
~/.cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
2024-12-12 19:18:19 -08:00
2024-12-12 19:20:46 -08:00
- name: Update dependencies
2024-12-12 19:09:26 -08:00
run: cargo fetch
- name: Check formatting
run: cargo fmt --check
- name: Check Clippy
run: cargo clippy --all --all-features -- -D warnings
- name: Build crate
run: cargo build --all --all-features
- name: Run tests
run: cargo test --all --all-features