Skip to content

Commit

Permalink
Merge pull request #3 from jplatte/gh-actions
Browse files Browse the repository at this point in the history
Add GitHub actions CI workflow
  • Loading branch information
TobiasJacob authored May 26, 2024
2 parents 9357a82 + 4f32428 commit 4d2a600
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI

on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]

env:
CARGO_TERM_COLOR: always

jobs:
formatting:
name: Check Formatting
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo fmt -- --check

test:
name: Run tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo test

docs:
name: Check documentation
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo doc --all-features
env:
RUSTDOCFLAGS: "-D warnings"

clippy:
name: Run clippy
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-features -- -D warnings

0 comments on commit 4d2a600

Please sign in to comment.