Skip to content

Commit

Permalink
Add basic CI checks
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Jun 18, 2024
1 parent b55bcb9 commit 09fb4f7
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
on:
pull_request:
push:
branches:
- main

name: CI

env:
RUSTDOCFLAGS: "-D warnings"
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: "sparse"

jobs:

# MSRV check.
# Blitz only guarantees "latest stable". However we have this check here to ensure that we advertise
# our MSRV. We also make an effort not to increase MSRV in patch versions of Blitz.
#
# We only run `cargo build` (not `cargo test`) so as to avoid requiring dev-dependencies to build with the MSRV
# version. Building is likely sufficient as runtime errors varying between rust versions is very unlikely.
build-msrv:
name: "MSRV Build [Rust 1.79]"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.79
- run: cargo build


build-features-default:
name: "Build [default features]"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --workspace
# - run: cargo test

test-features-default:
name: "Test [default features]"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt
- run: cargo fmt --all --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: clippy
- run: cargo clippy --workspace -- -D warnings

doc:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo doc

0 comments on commit 09fb4f7

Please sign in to comment.