chore: pin rust toolchain version #688
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: ci | |
on: | |
pull_request: | |
push: | |
branches: [ main ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: full | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@1fbea72663f6d4c03efaab13560c8a24cfd2a7cc # v1 | |
with: | |
components: clippy | |
- name: Cache rust build files | |
uses: Leafwing-Studios/cargo-cache@6c2a159aab4b3ba20f083d241bb1f26b35262b99 # v2 | |
- name: check (release) | |
run: cargo check --workspace --all-targets --all-features --release | |
- name: clippy | |
run: cargo clippy --workspace --all-targets --all-features -- -D warnings --force-warn deprecated --force-warn dead-code | |
## Tests | |
# Install sops (needed for decrypting tests .env file) | |
- name: Setup sops | |
uses: nhedger/setup-sops@358bac533e4e92f9ce9f9da563d6265929c88cda # v2 | |
# Install age (needed for decrypting tests .env file) | |
- name: Setup age | |
uses: alessiodionisi/setup-age-action@82b9aea163ade7fe23441552a514cf666b214077 # v1.3.0 | |
- name: unit-tests | |
uses: LNSD/sops-exec-action@6da1fbca63459d9796097496d5f5e6233555b31a # v1 | |
env: | |
SOPS_AGE_KEY: ${{ secrets.IT_TESTS_AGE_KEY }} | |
with: | |
env_file: .env | |
run: cargo test --workspace --all-features --lib | |
- name: doc-tests | |
uses: LNSD/sops-exec-action@6da1fbca63459d9796097496d5f5e6233555b31a # v1 | |
env: | |
SOPS_AGE_KEY: ${{ secrets.IT_TESTS_AGE_KEY }} | |
with: | |
env_file: .env | |
run: cargo test --workspace --all-features --doc | |
- name: integration-tests | |
uses: LNSD/sops-exec-action@6da1fbca63459d9796097496d5f5e6233555b31a # v1 | |
env: | |
SOPS_AGE_KEY: ${{ secrets.IT_TESTS_AGE_KEY }} | |
with: | |
env_file: .env | |
run: cargo test --workspace --all-features --test '*' | |
format: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: Setup Rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@1fbea72663f6d4c03efaab13560c8a24cfd2a7cc # v1 | |
with: | |
toolchain: nightly | |
components: rustfmt | |
- run: cargo +nightly fmt --all -- --check |