-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from storopoli/ci
ci: GitHub Actions and Dependabot
- Loading branch information
Showing
3 changed files
with
109 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: {} | ||
workflow_dispatch: null | ||
|
||
jobs: | ||
check: | ||
name: "Check the code compiles" | ||
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 | ||
|
||
fmt: | ||
name: "Cargo 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: | ||
name: "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: Clippy default | ||
run: make check-default | ||
- name: Clippy all features | ||
run: make check-mixed | ||
- name: Clippy libsecp feature set | ||
run: make check-secp256k1 | ||
- name: Clippy pure-rust feature set | ||
run: make check-k256 | ||
|
||
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] | ||
recipe: | ||
- "test-default" | ||
- "test-mixed" | ||
- "test-secp256k1" | ||
- "test-k256" | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Setup Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
- name: Run tests | ||
run: make ${{ matrix.recipe }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters