Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ci/refactor #32

Merged
merged 43 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
b94f90f
ci: 🤖 Move reuse compliance check to "lint.yml" and add a name to the…
AntwortEinesLebens Aug 17, 2024
9574c7c
ci: 🤖 Rename rust ci to build
AntwortEinesLebens Aug 17, 2024
659aa3e
ci: 🤖 Rewrite build ci
AntwortEinesLebens Aug 17, 2024
a41b3e8
ci: 🤖 Add rustfmt check
AntwortEinesLebens Aug 17, 2024
eab929a
ci: 🤖 Fix crates.io jobs' name
AntwortEinesLebens Aug 17, 2024
34dc862
ci: 🤖 Fix tags section
AntwortEinesLebens Aug 17, 2024
dd6e06f
style: 💄 Remove "" to stay coherent
AntwortEinesLebens Aug 17, 2024
5bdbc1a
ci: 🤖 Move env declaration into rust job
AntwortEinesLebens Aug 17, 2024
35f93ab
ci: 🤖 Add all features flag
AntwortEinesLebens Aug 17, 2024
a13c8b7
ci: 🤖 Simplify the name of the step
AntwortEinesLebens Aug 17, 2024
dc470c5
ci: 🤖 Add step name
AntwortEinesLebens Aug 17, 2024
e8aafc2
ci: 🤖 Improve step name
AntwortEinesLebens Aug 17, 2024
b7a4cdf
ci: 🤖 Add support for Clippy
AntwortEinesLebens Aug 17, 2024
858cb86
ci: 🤖 Switch to windows
AntwortEinesLebens Aug 19, 2024
daba5b4
ci: 🤖 Add caching
AntwortEinesLebens Aug 19, 2024
8561d1a
ci: 🤖 Add taplo to check TOML formatting
AntwortEinesLebens Aug 19, 2024
68e63be
ci: 🤖 Add formatting check for Markdown
AntwortEinesLebens Aug 19, 2024
dc52fd2
ci: 🤖 Try to remove caching because it's not a node project
AntwortEinesLebens Aug 19, 2024
c9d9425
ci: 🤖 Add pnpm environment variable
AntwortEinesLebens Aug 19, 2024
0339ccf
ci: 🤖 Check with Prettier
AntwortEinesLebens Aug 20, 2024
a873977
ci: 🤖 Add taplo for linting
AntwortEinesLebens Aug 21, 2024
58972ac
ci: 🤖 Remove double quotes
AntwortEinesLebens Aug 21, 2024
06283bd
ci: 🤖 Add all targets flag
AntwortEinesLebens Aug 22, 2024
76f8719
ci: 🤖 Add cargo-outdated
AntwortEinesLebens Aug 22, 2024
720d4a5
style: 💄 Format with YAML
AntwortEinesLebens Aug 22, 2024
07cc871
ci: 🤖 Add support for checking YAML formatting
AntwortEinesLebens Aug 22, 2024
d646ebf
ci: 🤖 Change name of the step to be like the other one
AntwortEinesLebens Aug 22, 2024
34dc7cc
chore: 🧹 Add configuration file for cargo-deny
AntwortEinesLebens Aug 23, 2024
ca68805
ci: 🤖 Add cargo-deny
AntwortEinesLebens Aug 23, 2024
274f62d
chore: 🧹 Remove git-cliff copyright, it was a mistake
AntwortEinesLebens Aug 26, 2024
33ec2d2
chore: 🧹 Allow Unicode license
AntwortEinesLebens Aug 26, 2024
df83af3
ci: 🤖 Add audit CI
AntwortEinesLebens Aug 26, 2024
8dd9851
ci: 🤖 Use the recommended extention
AntwortEinesLebens Aug 26, 2024
9a90822
ci: 🤖 Remove prettier and use mdformat instead
AntwortEinesLebens Aug 26, 2024
478078d
ci: 🤖 Add Markdown linting
AntwortEinesLebens Aug 27, 2024
9077fbb
chore: 🧹 Remove FSFE copyright because it's no longer based on their …
AntwortEinesLebens Aug 27, 2024
3442a14
ci: 🤖 Add linter for YAML
AntwortEinesLebens Aug 27, 2024
d3fbd91
ci: 🤖 Add MSRV check
AntwortEinesLebens Aug 27, 2024
a3d311f
ci: 🤖 Make cargo-outdated fail if new versions available
AntwortEinesLebens Aug 27, 2024
04eafd3
ci: 🤖 Add workspace flag
AntwortEinesLebens Aug 27, 2024
70d4f42
ci: 🤖 Try to fix clippy CI
AntwortEinesLebens Aug 27, 2024
c69dd71
ci: 🤖 Maybe this time?
AntwortEinesLebens Aug 27, 2024
11345c5
ci: 🤖 Fix multiline for windows
AntwortEinesLebens Aug 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/audit.yaml
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
43 changes: 43 additions & 0 deletions .github/workflows/build.yaml
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
59 changes: 59 additions & 0 deletions .github/workflows/format.yaml
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
92 changes: 92 additions & 0 deletions .github/workflows/lint.yaml
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
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
---
# SPDX-FileCopyrightText: 2023 The WAG development team
#
# SPDX-License-Identifier: CC0-1.0

name: Create new release

on:
push:
tag:
- "v**"

tags: ['**']
jobs:
github:
name: Create a Github release
Expand All @@ -28,7 +25,7 @@ jobs:
uses: softprops/action-gh-release@v2
with:
body_path: CHANGELOG.md
crates.io:
crates-io:
name: Publish to crates.io
runs-on: windows-latest
steps:
Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/reuse.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/rust.yml

This file was deleted.

9 changes: 9 additions & 0 deletions .markdownlint-cli2.yaml
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']
8 changes: 8 additions & 0 deletions .yamllint.yaml
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
19 changes: 19 additions & 0 deletions deny.toml
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"
Loading