summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorSam Tay <samctay@pm.me>2022-08-21 01:33:34 -0700
committerSam Tay <samctay@pm.me>2022-08-21 01:46:35 -0700
commite4d44be6537299f54abb36a517abb4c2845ff80e (patch)
treecbc63fae60ecf906644b4afff74ba9c4e3704cce /.github
parent8814a90ac85fb007aa394e34ac4290fd3fe1d2e2 (diff)
Create GH ci check
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml41
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