test passed. #376
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", "develop" ] | |
paths-ignore: | |
- "**.md" | |
- "Makefile" | |
- ".dockerignore" | |
- ".gitignore" | |
pull_request: | |
branches: [ "main" ] | |
paths-ignore: | |
- "**.md" | |
- "Makefile" | |
- ".dockerignore" | |
- ".gitignore" | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
name: Run clippy | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Setup rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Run clippy | |
run: cargo clippy --all-targets --all-features -- -D warnings -D dead-code -D clippy::unnecessary-fold -D clippy::option-map-or-none -D unused-imports -D unused-imports -D clippy::bind-instead-of-map -D clippy::redundant-closure -D clippy::option-map-or-none | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache | |
uses: Swatinem/rust-cache@v1 | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --all-targets --all-features --verbose | |
examples: | |
name: Examples | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install toolchain | |
run: rustup install stable | |
- name: Add problem matchers | |
run: echo "::add-matcher::.github/matchers/rust.json" | |
- name: Cache | |
uses: Swatinem/rust-cache@v1 | |
- name: 'Check example 1' | |
run: cargo check -p l02_operator | |
- name: 'Check example 2' | |
run: cargo check -p l03_variable | |
- name: 'Check example 3' | |
run: cargo check -p l05_control_formula | |