diff options
author | Sam Tay <samctay@pm.me> | 2022-08-21 01:33:34 -0700 |
---|---|---|
committer | Sam Tay <samctay@pm.me> | 2022-08-21 01:46:35 -0700 |
commit | e4d44be6537299f54abb36a517abb4c2845ff80e (patch) | |
tree | cbc63fae60ecf906644b4afff74ba9c4e3704cce /.github | |
parent | 8814a90ac85fb007aa394e34ac4290fd3fe1d2e2 (diff) |
Create GH ci check
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/ci.yml | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9fdc4be --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: CI + +on: + push: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Install minimal stable with clippy and rustfmt + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + components: rustfmt, clippy + + - uses: Swatinem/rust-cache@v2 + + - name: Check formatting + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all --check + + - name: Build application + uses: actions-rs/cargo@v1 + with: + command: build + + - name: Run clippy linter + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --all-targets -- --deny warnings + + - name: Run tests + uses: actions-rs/cargo@v1 + with: + command: test |