-
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.
- Loading branch information
1 parent
9152662
commit aa75c12
Showing
5 changed files
with
117 additions
and
52 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,95 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- feature/** | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
pre_job: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
should_skip: ${{ steps.skip_check.outputs.should_skip }} | ||
steps: | ||
- id: skip_check | ||
uses: fkirc/[email protected] | ||
with: | ||
cancel_others: "true" | ||
|
||
check: | ||
name: Lint and Check | ||
if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.event_name != 'pull_request' }} | ||
timeout-minutes: 10 | ||
needs: pre_job | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
CARGO_INCREMENTAL: 0 | ||
CARGO_PROFILE_DEV_STRIP: "debuginfo" | ||
CARGO_PROFILE_TEST_STRIP: "debuginfo" | ||
CARGO_PROFILE_RELEASE_STRIP: "debuginfo" | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install nightly toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
components: rustfmt, clippy | ||
|
||
- name: Run cargo fmt | ||
run: cargo +nightly fmt --all -- --check | ||
|
||
- name: Run cargo clippy | ||
run: cargo +nightly clippy --all-targets --features python -- -D warnings | ||
|
||
- name: Run cargo check | ||
run: cargo +nightly check --all-targets --features python | ||
|
||
- name: Run cargo check (no default features) | ||
run: cargo +nightly check --all-targets --no-default-features | ||
|
||
test: | ||
name: Test Suite | ||
if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.event_name != 'pull_request' }} | ||
timeout-minutes: 10 | ||
needs: pre_job | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
CARGO_INCREMENTAL: 0 | ||
CARGO_PROFILE_DEV_STRIP: "debuginfo" | ||
CARGO_PROFILE_TEST_STRIP: "debuginfo" | ||
CARGO_PROFILE_RELEASE_STRIP: "debuginfo" | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install nightly toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: ${{ matrix.rust_release == 'latest-nightly' }} | ||
|
||
- name: Install cargo-nextest (linux) | ||
run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin | ||
|
||
- name: Run cargo nextest on all targets | ||
run: cargo nextest run --no-fail-fast --all-targets | ||
|
||
- name: Run doctests | ||
run: cargo test --no-fail-fast --doc |
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 @@ | ||
name: Conventional Commits | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
permissions: | ||
pull-requests: read | ||
|
||
jobs: | ||
main: | ||
name: Conventional Commits | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,2 @@ | ||
[toolchain] | ||
channel = "stable" |