aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
diff options
context:
space:
mode:
authorGus Power <gus@infinitesidequests.com>2025-05-12 15:59:16 +0100
committerGus Power <gus@infinitesidequests.com>2025-05-12 15:59:16 +0100
commit65746b829b8247ab366182ea028dc1eb0d21522a (patch)
treec461ea26229177d74e0708bacc739c07892f6d1b /.github/workflows/ci.yml
parent1d6fd8359fddbae8aeac17b90ed50d41143ffbb6 (diff)
add github template stuff as per https://rust-github.github.io/
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r--.github/workflows/ci.yml64
1 files changed, 64 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..56067a6
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,64 @@
+name: CI # Continuous Integration
+
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+
+jobs:
+
+ test:
+ name: Test Suite
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ - name: Install Rust toolchain
+ uses: dtolnay/rust-toolchain@stable
+ - uses: Swatinem/rust-cache@v2
+ - name: Run tests
+ run: cargo test --all-features --workspace
+
+ rustfmt:
+ name: Rustfmt
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ - name: Install Rust toolchain
+ uses: dtolnay/rust-toolchain@stable
+ with:
+ components: rustfmt
+ - uses: Swatinem/rust-cache@v2
+ - name: Check formatting
+ run: cargo fmt --all --check
+
+ clippy:
+ name: Clippy
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ - name: Install Rust toolchain
+ uses: dtolnay/rust-toolchain@stable
+ with:
+ components: clippy
+ - uses: Swatinem/rust-cache@v2
+ - name: Clippy check
+ run: cargo clippy --all-targets --all-features --workspace -- -D warnings
+
+ docs:
+ name: Docs
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ - name: Install Rust toolchain
+ uses: dtolnay/rust-toolchain@stable
+ - uses: Swatinem/rust-cache@v2
+ - name: Check documentation
+ env:
+ RUSTDOCFLAGS: -D warnings
+ run: cargo doc --no-deps --document-private-items --all-features --workspace --examples
+