diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..39f6481 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: Numtracker CI + +on: + push: + pull_request: + +env: + CARGO_TERM_COLOR: always + +jobs: + test: + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + components: rustfmt, clippy + - uses: Swatinem/rust-cache@v2 + + - name: Check formating + run: cargo fmt -- --check + + - name: Clippy + run: | + cargo --version + cargo clippy --version + cargo clippy --all-targets --all-features -- --deny warnings + + - name: Check formating + run: cargo fmt -- --check + + - name: Run tests + run: cargo test --verbose