Skip to content

Commit

Permalink
ci: adds continuous integration workflow (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
claymcleod authored Sep 5, 2024
1 parent d20d8de commit a807199
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 21 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI

on:
push:
branches:
- main
pull_request:

jobs:
format:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Update Rust
run: rustup update nightly && rustup default nightly
- name: Install rustfmt
run: rustup component add rustfmt
- run: cargo fmt -- --check

lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Update Rust
run: rustup update stable && rustup default stable
- name: Install clippy
run: rustup component add clippy
- run: cargo clippy --all-features -- --deny warnings

test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Update Rust
run: rustup update stable && rustup default stable
- run: cargo test --all-features

test-examples:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Update Rust
run: rustup update stable && rustup default stable
- run: cargo test --all-features --examples

docs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Update Rust
run: rustup update stable && rustup default stable
- run: cargo doc
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
url = "2.5.2"

[lints.rust]
broken_intra_doc_links = "warn"
missing_docs = "warn"
nonstandard-style = "warn"
rust-2018-idioms = "warn"
rust-2021-compatibility = "warn"
rust-2024-compatibility = "warn"

[lints.rustdoc]
missing_doc_code_examples = "warn"
broken_intra_doc_links = "warn"

[lints.clippy]
missing_docs_in_private_items = "warn"
19 changes: 0 additions & 19 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,6 @@ pub type BoxedError = Box<dyn std::error::Error>;
/// `Logger`) if that is the construct struct wrapped.
/// * `variant` is the name of the variant in the enum that wraps the concrete
/// struct (e.g., `Logger` if the variant is `Self::Logger`).
///
/// A simple example:
///
/// ```rust
/// /// Services that can be registered within the engine.
/// #[derive(Debug)]
/// pub enum Service {
/// /// A logging service.
/// Logger(Logger),
///
/// /// A task runner service.
/// Runner(Runner),
/// }
///
/// impl Service {
/// as_into_unwrap!(logger, Logger, Logger);
/// as_into_unwrap!(runner, Runner, Runner);
/// }
/// ```
#[macro_export]
macro_rules! as_into_unwrap {
($suffix:ident, $inner:ty, $variant:ident) => {
Expand Down

0 comments on commit a807199

Please sign in to comment.