-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add makefile and update workflows
- Loading branch information
1 parent
341195a
commit e7bfb0c
Showing
13 changed files
with
502 additions
and
427 deletions.
There are no files selected for viewing
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,19 @@ | ||
|
||
name: Conventional commit check | ||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
# This workflow denies a push on a pull request if all pushed commits are not following | ||
# the conventional commits standard. | ||
|
||
jobs: | ||
conv-commit: | ||
name: Enforce conventional commit messages | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout pull request | ||
uses: actions/checkout@v3 | ||
|
||
- name: Check all commit messages for adherence | ||
uses: bilalshaikh42/[email protected] |
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,24 @@ | ||
name: Check for errors | ||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
env: | ||
RUSTFLAGS: -D warnings | ||
|
||
jobs: | ||
cargo-check: | ||
name: Cargo check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install cargo make | ||
uses: davidB/rust-cargo-make@v1 | ||
|
||
- name: Install stable Rust | ||
run: cargo make install-stable | ||
|
||
- name: Check | ||
run: cargo make check |
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,33 @@ | ||
name: Coverage | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
env: | ||
RUST_BACKTRACE: 1 | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install cargo make | ||
uses: davidB/rust-cargo-make@v1 | ||
|
||
- name: Install stable Rust | ||
run: cargo make install-stable | ||
|
||
- name: Run test coverage | ||
run: cargo make coverage-lcov | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: target/coverage/lcov.info |
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,34 @@ | ||
name: Check licenses and sources | ||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
env: | ||
RUSTFLAGS: -D warnings | ||
|
||
jobs: | ||
cargo-deny: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
checks: | ||
- advisories | ||
- bans licenses sources | ||
|
||
# Prevent sudden announcement of a new advisory from failing ci: | ||
continue-on-error: ${{ matrix.checks == 'advisories' }} | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install cargo make | ||
uses: davidB/rust-cargo-make@v1 | ||
|
||
- name: Install stable toolchain | ||
run: cargo make install-stable | ||
|
||
- name: run cargo deny | ||
uses: EmbarkStudios/cargo-deny-action@v1 | ||
with: | ||
command: check ${{ matrix.checks }} |
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,34 @@ | ||
name: Linting and formatting | ||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
env: | ||
RUSTFLAGS: -D warnings | ||
|
||
jobs: | ||
lint-and-format: | ||
name: Lint and check formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install cargo make | ||
uses: davidB/rust-cargo-make@v1 | ||
|
||
- name: Install nightly toolchain | ||
run: cargo make install-nightly | ||
|
||
- name: Run cargo clippy | ||
run: cargo make clippy-check | ||
|
||
- name: Run cargo fmt | ||
run: cargo make format-check | ||
|
||
- name: Run cargo machete | ||
run: cargo make machete-check | ||
|
||
# TODO: Enable when project more mature | ||
# - name: Lint todo comments | ||
# run: cargo make todo-check |
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 Suite | ||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
env: | ||
RUSTFLAGS: -D warnings | ||
|
||
jobs: | ||
test: | ||
name: Test Suite | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install cargo make | ||
uses: davidB/rust-cargo-make@v1 | ||
|
||
- name: Install stable toolchain | ||
run: cargo make install-stable | ||
|
||
- name: Run unit tests | ||
run: cargo make unit-test | ||
env: | ||
RUST_BACKTRACE: 1 | ||
|
||
# No integration tests yet | ||
# - name: Run integration tests | ||
# run: cargo make integration-test | ||
# env: | ||
# RUST_BACKTRACE: 1 |
Oops, something went wrong.