summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2024-02-10 08:10:16 +0100
committerMatthias Beyer <mail@beyermatthias.de>2024-02-10 08:10:16 +0100
commit011d14015a5611f03a677fc5213c59a8935dee0d (patch)
tree6e36cc03c22a03bafc50db952053afed5d542d8c
parente57b341d4c0e47a526646403d1e8a183191c6631 (diff)
Add github-actions configuration
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--.github/workflows/ci.yml78
1 files changed, 78 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..b70efcc
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,78 @@
+on: [push, pull_request]
+
+name: MSRV
+
+jobs:
+ check:
+ name: Check
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout sources
+ uses: actions/checkout@v4.1.1
+
+ - name: Install toolchain
+ uses: dtolnay/rust-toolchain@master
+ with:
+ toolchain: 1.75.0
+
+ - name: Cache
+ uses: Swatinem/rust-cache@v2
+
+ - name: Run cargo check
+ run: cargo check --all-features --examples --tests
+
+ test:
+ name: Test Suite
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout sources
+ uses: actions/checkout@v4.1.1
+
+ - name: Install toolchain
+ uses: dtolnay/rust-toolchain@master
+ with:
+ toolchain: 1.75.0
+
+ - name: Cache
+ uses: Swatinem/rust-cache@v2
+
+ - name: Run cargo test
+ run: cargo test --all-features
+
+ fmt:
+ needs: [check]
+ name: Rustfmt
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout sources
+ uses: actions/checkout@v4.1.1
+
+ - name: Install toolchain
+ uses: dtolnay/rust-toolchain@master
+ with:
+ toolchain: 1.75.0
+ components: rustfmt
+
+ - name: Run cargo fmt
+ run: cargo fmt --all -- --check
+
+ clippy:
+ needs: [check]
+ name: Clippy
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout sources
+ uses: actions/checkout@v4.1.1
+
+ - name: Install toolchain
+ uses: dtolnay/rust-toolchain@master
+ with:
+ toolchain: 1.75.0
+ components: clippy
+
+ - name: Cache
+ uses: Swatinem/rust-cache@v2
+
+ - name: Run cargo clippy
+ run: cargo clippy --all-targets --all-features -- -D warnings
+