summaryrefslogtreecommitdiffstats
path: root/.github/workflows/ci.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/ci.yml')
-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