Zach/manual #336
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 the application with Cargo | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: | |
- stable | |
- beta | |
- nightly | |
- 1.75.0 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install the Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
override: true | |
components: rustfmt, clippy | |
- name: Build the package | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
- name: Test the package | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
- name: Check the package for poor code style | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all --check | |
- name: Check the package for lints | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: -- -D warnings | |
- name: Build the package's documentation | |
uses: actions-rs/cargo@v1 | |
with: | |
command: doc |