build #33
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 | |
on: | |
schedule: | |
# Run every Monday at 00:00 UTC. | |
- cron: '0 0 * * 1' | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
name: Check on ${{ matrix.rust }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
- nightly | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install ${{ matrix.rust }} | |
run: | | |
rustup toolchain install ${{ matrix.rust }} --profile minimal --component rustfmt,clippy | |
rustup default ${{ matrix.rust }} | |
- name: Run cargo check | |
continue-on-error: ${{ matrix.rust == 'nightly' }} | |
run: cargo check | |
- name: Run cargo fmt | |
continue-on-error: ${{ matrix.rust == 'nightly' }} | |
run: cargo fmt --all -- --check | |
- name: Run cargo clippy | |
continue-on-error: ${{ matrix.rust == 'nightly' }} | |
run: cargo clippy -- -D warnings -W clippy::nursery | |
- name: Run cargo test | |
continue-on-error: ${{ matrix.rust == 'nightly' }} | |
run: cargo test --release |