forked from withoutboats/bpb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style and lint fixes, add test/lint CI
- Loading branch information
Showing
8 changed files
with
355 additions
and
212 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,67 @@ | ||
# https://github.com/BamPeers/rust-ci-github-actions-workflow | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
name: Check and Lint | ||
|
||
jobs: | ||
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
env: | ||
RUSTFLAGS: "-D warnings" | ||
|
||
fmt: | ||
name: Rustfmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
- run: rustup component add rustfmt | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
components: clippy | ||
override: true | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: --all-features | ||
env: | ||
RUSTFLAGS: "-D warnings" | ||
|
||
markdownlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: nosborn/[email protected] | ||
with: | ||
files: . |
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,65 @@ | ||
# https://github.com/BamPeers/rust-ci-github-actions-workflow | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
name: Test # with Code Coverage | ||
|
||
permissions: | ||
contents: read | ||
checks: write | ||
pull-requests: write | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
env: | ||
PROJECT_NAME_UNDERSCORE: bpb_pkgx | ||
CARGO_INCREMENTAL: 0 | ||
RUSTFLAGS: -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort -D warnings | ||
RUSTDOCFLAGS: -Cpanic=abort | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-dependencies | ||
with: | ||
path: | | ||
~/.cargo/.crates.toml | ||
~/.cargo/.crates2.json | ||
~/.cargo/bin | ||
~/.cargo/registry/index | ||
~/.cargo/registry/cache | ||
target | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }} | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --all-features | ||
|
||
# coverage: | ||
# name: Coverage | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - uses: actions-rs/toolchain@v1 | ||
# with: | ||
# profile: minimal | ||
# toolchain: nightly | ||
# override: true | ||
# - name: Generate test result and coverage report | ||
# run: | | ||
# cargo install cargo-tarpaulin | ||
# cargo tarpaulin --engine ptrace -o lcov --output-dir coverage --coveralls $COVERALLS_TOKEN | ||
# env: | ||
# COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
|
@@ -11,8 +11,8 @@ authors = ["Without Boats <[email protected]>", "Jacob Heider <[email protected]>"] | |
toml = "0.4.6" | ||
rand = { version = "0.8.5", features = ["std"] } | ||
sha2 = "0.7.1" | ||
serde_derive = "1.0.70" | ||
serde = "1.0.70" | ||
serde_derive = "1.0.215" | ||
serde = "1.0.215" | ||
hex = "0.3.2" | ||
failure = "0.1.1" | ||
|
||
|
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 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
Oops, something went wrong.