-
Notifications
You must be signed in to change notification settings - Fork 3
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 #2 from Alzymologist/ci-init
ci: init
- Loading branch information
Showing
6 changed files
with
194 additions
and
0 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,12 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "cargo" | ||
directory: "/" | ||
labels: ["dependabot"] | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
labels: ["dependabot-ci"] | ||
schedule: | ||
interval: "weekly" |
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,29 @@ | ||
name: Check cargo deny | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- stable | ||
|
||
jobs: | ||
cargo-deny: | ||
name: Cargo deny | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
checks: | ||
- advisories | ||
|
||
continue-on-error: ${{ matrix.checks == 'advisories' }} | ||
|
||
steps: | ||
- name: Checkout Sources | ||
uses: actions/[email protected] | ||
|
||
- 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,38 @@ | ||
name: Rust clippy | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- stable | ||
|
||
jobs: | ||
linter: | ||
name: Cargo clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout sources | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 50 | ||
submodules: 'recursive' | ||
|
||
- name: Install Rust stable toolchain | ||
uses: actions-rs/[email protected] | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
|
||
- name: cargo clippy | ||
run: cargo clippy --all-targets -- -D warnings |
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,35 @@ | ||
name: Rustfmt | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- stable | ||
|
||
jobs: | ||
rustfmt: | ||
name: Cargo fmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout sources | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 50 | ||
submodules: 'recursive' | ||
|
||
- name: Install Rust stable toolchain | ||
uses: actions-rs/[email protected] | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- name: cargo fmt | ||
run: cargo fmt --all -- --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,44 @@ | ||
name: Rust test | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- stable | ||
|
||
jobs: | ||
check: | ||
name: Cargo test | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout sources | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 50 | ||
submodules: 'recursive' | ||
|
||
- name: Install Rust stable toolchain | ||
uses: actions-rs/[email protected] | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Install cargo-nextest | ||
uses: baptiste0928/cargo-install@v3 | ||
with: | ||
crate: cargo-nextest | ||
version: 0.9 | ||
|
||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
|
||
- name: cargo nextest | ||
run: cargo nextest run |
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,36 @@ | ||
name: Semantic PR | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
main: | ||
# By default, these PR titles are allowed: | ||
# https://github.com/commitizen/conventional-commit-types | ||
name: Validate PR title | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
# Documentation: https://github.com/amannn/action-semantic-pull-request | ||
- uses: amannn/action-semantic-pull-request@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
types: | | ||
major | ||
feat | ||
fix | ||
chore | ||
docs | ||
style | ||
refactor | ||
test | ||
build | ||
ci | ||
revert | ||
validateSingleCommit: true | ||
wip: true |