Skip to content

Commit

Permalink
Merge pull request #3 from alpenlabs/storopoli/ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Zk2u authored and storopoli committed Sep 13, 2024
2 parents a284c89 + a76ccf6 commit af506e2
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "monthly"
73 changes: 73 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: CI

on:
push:
branches:
- main
pull_request: {}
workflow_dispatch: null

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Check
run: cargo check --all-features

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

clippy:
needs: [check, fmt]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Check
run: cargo clippy --all-features -- -D warnings

docs:
needs: [check, fmt]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: cargo doc
env:
RUSTDOCFLAGS: "-D rustdoc::all -A rustdoc::private-doc-tests"
run: cargo doc --all-features --no-deps

test:
needs: [check, fmt, clippy]
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, beta]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
- name: Run tests
run: cargo test --all-features

0 comments on commit af506e2

Please sign in to comment.