diff --git a/.github/workflows/check_and_lint.yaml b/.github/workflows/check_and_lint.yaml new file mode 100644 index 0000000..7794a8b --- /dev/null +++ b/.github/workflows/check_and_lint.yaml @@ -0,0 +1,50 @@ +on: [push] + +name: Check, Lint, Build + +env: + CARGO_TERM_COLOR: always + +jobs: + check-lint-build-stable: + name: Check, Lint, Build (stable) + runs-on: ubuntu-latest + timeout-minutes: 20 + # env: + # RUSTFLAGS: -D warnings + steps: + - uses: actions/checkout@v2 + - name: Install latest stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + components: rustfmt, clippy + override: true + target: x86_64-pc-windows-gnu + + - name: Rust Cache + uses: Swatinem/rust-cache@v2.5.1 + + - name: Rustfmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + - name: Cargo check + uses: actions-rs/cargo@v1 + with: + command: check + + - name: Clippy + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --all-targets --all-features + + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: --release \ No newline at end of file