-
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.
Merge pull request #32 from frack113/ci/refactor
Ci/refactor
- Loading branch information
Showing
10 changed files
with
250 additions
and
46 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,17 @@ | ||
--- | ||
# SPDX-FileCopyrightText: 2023 The WAG development team | ||
# | ||
# SPDX-License-Identifier: CC0-1.0 | ||
name: Audit the project | ||
on: [push, pull_request] | ||
jobs: | ||
cargo-deny: | ||
name: Audit with cargo-deny | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Audit Rust code | ||
uses: EmbarkStudios/cargo-deny-action@v1 | ||
with: | ||
command: check advisories |
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,43 @@ | ||
--- | ||
# SPDX-FileCopyrightText: 2023 The WAG development team | ||
# | ||
# SPDX-License-Identifier: CC0-1.0 | ||
name: Build and test the project | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
jobs: | ||
rust: | ||
name: Build Rust code | ||
runs-on: windows-latest | ||
env: | ||
CARGO_TERM_COLOR: always | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Add caching | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Build Rust code | ||
run: cargo build -v --workspace --all-targets --all-features | ||
- name: Run Rust tests | ||
run: cargo test -v --workspace --all-targets --all-features | ||
msrv: | ||
name: Check MSRV | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install cargo-hack | ||
uses: taiki-e/install-action@cargo-hack | ||
- name: Check MSRV | ||
run: |- | ||
cargo hack check ` | ||
-v ` | ||
--rust-version ` | ||
--workspace ` | ||
--all-targets ` | ||
--all-features |
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,59 @@ | ||
--- | ||
# SPDX-FileCopyrightText: 2023 The WAG development team | ||
# | ||
# SPDX-License-Identifier: CC0-1.0 | ||
name: Check formatting of the project | ||
on: [push, pull_request] | ||
jobs: | ||
yamlfix: | ||
name: Check YAML formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
cache: pip | ||
- name: Install yamlfix | ||
run: pip install yamlfix | ||
- name: Check YAML formatting | ||
run: yamlfix -v --check . | ||
mdformat: | ||
name: Check Markdown formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
cache: pip | ||
- name: Install Mdformat | ||
run: pip install mdformat | ||
- name: Check Markdown formatting | ||
run: mdformat --check . | ||
rustfmt: | ||
name: Check Rust formatting | ||
runs-on: ubuntu-latest | ||
env: | ||
CARGO_TERM_COLOR: always | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install rustfmt | ||
uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
components: rustfmt | ||
- name: Check Rust formatting | ||
run: cargo fmt -v --all -- --check | ||
taplo: | ||
name: Check TOML formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install taplo | ||
uses: uncenter/setup-taplo@v1 | ||
- name: Check TOML formatting | ||
run: taplo format --check --verbose |
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,92 @@ | ||
--- | ||
# SPDX-FileCopyrightText: 2023 The WAG development team | ||
# | ||
# SPDX-License-Identifier: CC0-1.0 | ||
name: Lint the project | ||
on: [push, pull_request] | ||
env: | ||
CARGO_TERM_COLOR: always | ||
jobs: | ||
yamllint: | ||
name: Lint with yamllint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
cache: pip | ||
- name: Install yamllint | ||
run: pip install yamllint | ||
- name: Check YAML formatting | ||
run: yamllint -s . | ||
reuse: | ||
name: Lint with REUSE | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Lint licenses | ||
uses: fsfe/reuse-action@v3 | ||
markdownlint-cli2: | ||
name: Lint with markdownlint-cli2 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Lint Markdown code | ||
uses: DavidAnson/markdownlint-cli2-action@v16 | ||
clippy: | ||
name: Lint with Clippy | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install Clippy | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: clippy | ||
- name: Add caching | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Lint Rust code | ||
run: |- | ||
cargo clippy ` | ||
--workspace ` | ||
--all-targets ` | ||
--all-features ` | ||
-- -D warnings | ||
cargo-deny: | ||
name: Lint with cargo-deny | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Lint Rust code | ||
uses: EmbarkStudios/cargo-deny-action@v1 | ||
with: | ||
command: check bans licenses sources | ||
cargo-outdated: | ||
name: Lint with cargo-outdated | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Add caching | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Install cargo-outdated | ||
run: cargo install --locked cargo-outdated | ||
- name: Lint Rust code | ||
run: cargo outdated -v --exit-code 1 -R -w | ||
taplo: | ||
name: Lint with taplo | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install taplo | ||
uses: uncenter/setup-taplo@v1 | ||
- name: Lint TOML code | ||
run: taplo lint --verbose **.toml |
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 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,9 @@ | ||
--- | ||
# SPDX-FileCopyrightText: 2023 The WAG development team | ||
# | ||
# SPDX-License-Identifier: CC0-1.0 | ||
config: | ||
first-line-h1: false | ||
no-inline-html: false | ||
gitignore: true | ||
globs: ['**.md'] |
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,8 @@ | ||
--- | ||
# SPDX-FileCopyrightText: 2023 The WAG development team | ||
# | ||
# SPDX-License-Identifier: CC0-1.0 | ||
extends: default | ||
rules: | ||
truthy: | ||
check-keys: false |
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 @@ | ||
# SPDX-FileCopyrightText: 2023 The WAG development team | ||
# | ||
# SPDX-License-Identifier: CC0-1.0 | ||
|
||
[graph] | ||
targets = ["x86_64-pc-windows-msvc"] | ||
all-features = true | ||
|
||
[licenses] | ||
confidence-threshold = 1.0 | ||
allow = ["Apache-2.0", "MIT", "Unicode-DFS-2016"] | ||
|
||
[bans] | ||
multiple-versions = "deny" | ||
multiple-versions-include-dev = true | ||
|
||
[sources] | ||
unknown-registry = "deny" | ||
unknown-git = "deny" |