Merge pull request #65 from aprimadi/workflow/integration_tests #130
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: Rust | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
typos: | |
name: Typos Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone this repository | |
uses: actions/checkout@v4 | |
- name: Check spelling | |
uses: crate-ci/typos@master | |
build: | |
runs-on: ubuntu-latest | |
needs: typos | |
steps: | |
- name: Clone this repository | |
uses: actions/checkout@v4 | |
- name: Rust Toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: Update Stable Rust toolchain | |
run: rustup update stable | |
- name: Add Cargo fmt | |
run: rustup component add rustfmt | |
- name: Install latest cargo-deny1 | |
uses: taiki-e/install-action@cargo-deny | |
- name: Run cargo fmt | |
run: cargo fmt --all -- --check | |
- name: Run cargo fmt | |
run: rustup component add clippy | |
- name: Clippy Code Check | |
run: cargo +stable clippy --all-targets --no-default-features -- --deny warnings | |
- name: Build | |
run: cargo build --verbose | |
test: | |
name: Run Tests | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Clone this repository | |
uses: actions/checkout@v4 | |
- name: Rust Toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: Update Stable Rust toolchain | |
run: rustup update stable | |
- name: Run tests | |
run: TEST_INTEGRATION=true cargo test --verbose |