Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Rust CI

on:
push:
branches: [main]
pull_request:

jobs:
cargo-check:
name: Cargo check
runs-on: namespace-profile-default
env:
CARGO_TERM_COLOR: always
steps:
- name: Check out repository code
uses: actions/checkout@v4

- name: Install Rust (latest nightly)
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly

- name: Cache build
uses: Swatinem/rust-cache@v2
with:
workspaces: .

- name: cargo check
run: cargo check --all --all-targets

tests:
name: Tests + doctests
runs-on: namespace-profile-default
env:
CARGO_TERM_COLOR: always
steps:
- name: Check out repository code
uses: actions/checkout@v4

- name: Install Rust (latest nightly)
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly

- name: Cache build
uses: Swatinem/rust-cache@v2
with:
workspaces: .

- name: cargo test
run: cargo test --all --all-targets

rustfmt:
name: Rustfmt
runs-on: namespace-profile-default
env:
CARGO_TERM_COLOR: always
steps:
- name: Check out repository code
uses: actions/checkout@v4

- name: Install Rust (latest nightly)
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
components: rustfmt

- name: Cache build
uses: Swatinem/rust-cache@v2
with:
workspaces: .

- name: cargo fmt --check (nightly)
run: cargo +nightly fmt --all -- --check

clippy:
name: Clippy
runs-on: namespace-profile-default
env:
CARGO_TERM_COLOR: always
steps:
- name: Check out repository code
uses: actions/checkout@v4

- name: Install Rust (latest nightly)
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
components: clippy

- name: Cache build
uses: Swatinem/rust-cache@v2
with:
workspaces: .

- name: cargo clippy
run: cargo +nightly clippy --all --all-targets -- -D warnings
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
target
.DS_Store
**/target
Loading
Loading