Merge pull request #1 from 0xb-s/add-equation-solver #3
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: Lint and Test | |
on: | |
push: | |
branches: ["main", "dev"] | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose | |
check: | |
name: "Cargo check" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Check out the repo" | |
uses: actions/checkout@v3 | |
with: | |
profile: "minimal" | |
toolchain: "stable" | |
override: true | |
- uses: "actions-rs/cargo@v1" | |
with: | |
command: "check" | |
test: | |
name: "Cargo test" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Check out the repo" | |
uses: actions/checkout@v3 | |
- uses: "actions-rs/toolchain@v1" | |
with: | |
profile: "minimal" | |
toolchain: "stable" | |
override: true | |
- uses: "actions-rs/cargo@v1" | |
with: | |
command: "test" | |
fmt: | |
name: "Cargo format" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Check out the repo" | |
uses: actions/checkout@v3 | |
- uses: "actions-rs/toolchain@v1" | |
with: | |
profile: "minimal" | |
toolchain: "stable" | |
override: true | |
- run: "rustup component add rustfmt" | |
- uses: "actions-rs/cargo@v1" | |
with: | |
command: "fmt" | |
args: "--all -- --check" | |
clippy: | |
name: "Cargo clippy" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Check out the repo" | |
uses: actions/checkout@v3 | |
- uses: "actions-rs/toolchain@v1" | |
with: | |
profile: "minimal" | |
toolchain: "stable" | |
override: true | |
- run: "rustup component add clippy" | |
- uses: "actions-rs/cargo@v1" | |
with: | |
command: "clippy" | |
args: "-- -D warnings" |