-
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.
build: improved CI and cleanup (#254)
Signed-off-by: blu3beri <[email protected]>
- Loading branch information
1 parent
42b7669
commit 49d6869
Showing
37 changed files
with
1,040 additions
and
518 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,15 @@ | ||
# -D: deny anything that goes wrong within this lint | ||
# -W: warn the user what went wrong, but allow to build | ||
# -A: allow the user to do "incorrect" behaviour | ||
[build] | ||
rustflags = ["-D", "clippy::all", | ||
"-D", "clippy::pedantic", | ||
"-D", "clippy::correctness", | ||
"-D", "clippy::suspicious", | ||
"-D", "clippy::style", | ||
"-D", "clippy::complexity", | ||
"-D", "clippy::perf", | ||
"-D", "clippy::missing_docs_in_private_items", | ||
"-A", "clippy::only_used_in_recursion", | ||
"-A", "clippy::struct_excessive_bools", | ||
"-A", "clippy::module_name_repetitions"] |
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,20 @@ | ||
coverage: | ||
# Hold ourselves to a high bar | ||
range: 85..100 | ||
round: down | ||
precision: 1 | ||
status: | ||
# ref: https://docs.codecov.com/docs/commit-status | ||
project: | ||
default: | ||
# Avoid false negatives | ||
threshold: 1% | ||
|
||
# Test files aren't important for coverage | ||
ignore: | ||
- 'tests' | ||
|
||
# Make comments less noisy | ||
comment: | ||
layout: 'files' | ||
require_changes: true |
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,16 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: daily | ||
- package-ecosystem: cargo | ||
directory: / | ||
schedule: | ||
interval: daily | ||
ignore: | ||
- dependency-name: '*' | ||
# patch and minor updates don't matter for libraries | ||
update-types: | ||
- 'version-update:semver-patch' | ||
- 'version-update:semver-minor' |
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: Check | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
name: Format | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install stable | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: rustfmt | ||
|
||
- name: Cache cargo resources | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
shared-key: deps | ||
cache-on-failure: true | ||
|
||
- run: cargo fmt --all -- --check | ||
|
||
clippy: | ||
runs-on: ubuntu-latest | ||
name: Clippy | ||
permissions: | ||
contents: read | ||
checks: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install stable | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: clippy | ||
|
||
- name: Cache cargo resources | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
shared-key: deps | ||
cache-on-failure: true | ||
|
||
- run: cargo clippy | ||
|
||
audit: | ||
runs-on: ubuntu-latest | ||
name: Audit | ||
permissions: | ||
contents: read | ||
checks: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install stable | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Cache cargo resources | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
shared-key: deps | ||
cache-on-failure: true | ||
|
||
- run: cargo audit | ||
|
||
check: | ||
runs-on: ubuntu-latest | ||
name: Check | ||
permissions: | ||
contents: read | ||
checks: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install stable | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Cache cargo resources | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
shared-key: deps | ||
cache-on-failure: true | ||
|
||
- run: cargo check --workspace |
This file was deleted.
Oops, something went wrong.
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,46 @@ | ||
name: Coverage | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
name: Coverage | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Install stable | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: llvm-tools-preview | ||
- name: cargo install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
- name: cargo generate-lockfile | ||
if: hashFiles('Cargo.lock') == '' | ||
run: cargo generate-lockfile | ||
- name: Cache cargo resources | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
shared-key: deps | ||
cache-on-failure: true | ||
- name: Start acapy | ||
run: docker-compose -f ./docker/docker-compose.acapy.min.yml up -d | ||
- name: cargo llvm-cov clean | ||
run: cargo llvm-cov clean --workspace | ||
- name: cargo llvm-cov | ||
run: cargo llvm-cov --locked --all-features --no-report --release | ||
- name: cargo llvm-cov report | ||
run: cargo llvm-cov report --release --lcov --output-path lcov.info | ||
- name: Upload to codecov.io | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
fail_ci_if_error: true |
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
This file was deleted.
Oops, something went wrong.
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,32 @@ | ||
name: Test | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
name: Test | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: clippy, rustfmt | ||
|
||
- name: Cache cargo resources | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
shared-key: deps | ||
cache-on-failure: true | ||
|
||
- name: Tests | ||
run: cargo test --workspace --exclude=e2e-tests |
Oops, something went wrong.