Rust CI/CD workflow #37
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 CI/CD workflow | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [ "main" ] | |
schedule: | |
- cron: '0 6 * * 1' | |
jobs: | |
rust-ci-cd-basic: | |
name: Run Rust CI/CD basic workflow | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
run: | | |
rustup toolchain install nightly | |
rustup component add clippy rustfmt | |
rustup default nightly | |
- name: Check Rust versions | |
run: make version | |
- name: Format | |
run: make format | |
- name: Lint | |
run: make lint | |
- name: Test | |
run: cargo test --verbose |