chore: release #2906
Workflow file for this run
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 & Test Rust | |
on: | |
push: | |
branches: [main, staging, trying] | |
pull_request: | |
branches: [main] | |
env: | |
COLUMNS: 250 | |
CARGO_INCREMENTAL: 0 | |
# TODO: Would be nice to disable warnings here too, but there are too many of them. | |
RUSTFLAGS: "-W rust-2021-compatibility" | |
RUST_BACKTRACE: short | |
NEXTEST_PROFILE: ci | |
CI: 1 | |
jobs: | |
build-rust: | |
# Skip draft release PRs | |
if: ${{ github.actor_id != '166170668' || github.event_name != 'pull_request' || github.event.pull_request.draft == false }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/[email protected] | |
with: | |
components: rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
- name: Check formatting | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Build cynic | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --workspace | |
- name: Install nextest | |
shell: bash | |
run: | | |
curl -LsSf https://get.nexte.st/0.9/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin | |
- name: Build tests | |
shell: bash | |
run: | | |
cargo nextest run --workspace --all-features --no-run | |
- name: Run tests | |
shell: bash | |
run: | | |
cargo nextest run --workspace --all-features | |
- name: Build example tests | |
shell: bash | |
run: | | |
cargo nextest run --workspace --examples --no-run | |
- name: Run example tests | |
shell: bash | |
run: | | |
cargo nextest run --workspace --examples | |
- name: Build & run doctests | |
shell: bash | |
run: | | |
cargo test --doc --workspace |