ci: update workflows #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test | |
on: | |
push: | |
branches: | |
- "master" | |
- "dev" | |
paths: | |
- "**.rs" | |
pull_request: | |
branches: | |
- "master" | |
- "dev" | |
paths: | |
- "**.rs" | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
concurrency: | |
group: "test" | |
cancel-in-progress: false | |
jobs: | |
build-and-test: | |
runs-on: self-hosted | |
steps: | |
- name: Set up required tools | |
run: sudo apt-get update && sudo apt-get install curl build-essential -y | |
- name: Checkout repository | |
uses: actions/checkout@v4.1.1 | |
- name: Install stable Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: Install nextest | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: nextest | |
- name: Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Compile project | |
run: cargo build --verbose | |
- name: Run unit and integration tests | |
run: cargo nextest run --all-features --all-targets --workspace --verbose | |
- name: Run documentation tests | |
run: cargo test --all-features --doc --workspace --verbose |