-
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
LJ
authored and
LJ
committed
Apr 6, 2024
1 parent
1b523b8
commit bb83b05
Showing
3 changed files
with
112 additions
and
3 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,110 @@ | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
name: CI | ||
jobs: | ||
deny: | ||
name: 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: | ||
- uses: actions/checkout@v4 | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: EmbarkStudios/cargo-deny-action@v1 | ||
with: | ||
command: check ${{ matrix.checks }} | ||
|
||
lints: | ||
name: Lints | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
- name: Install nightly toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: nightly | ||
components: rustfmt, clippy | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: FMT | ||
run: cargo fmt --all -- --check | ||
- name: Clippy | ||
run: cargo clippy --all-features -Z unstable-options --future-incompat-report -- -D warnings | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
- name: Install stable toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Test | ||
run: cargo test --all-features | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Build | ||
run: cargo build --all-features | ||
|
||
bloat: | ||
name: Bloat | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Run cargo bloat | ||
uses: orf/cargo-bloat-action@v1 | ||
continue-on-error: true | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
spellcheck: | ||
name: Spellcheck | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
- name: Install cargo-spellcheck | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: cargo-spellcheck | ||
- name: Run spellcheck | ||
run: cargo spellcheck --code 99 | ||
|
||
semver: | ||
name: Semver check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Check semver | ||
uses: obi1kenobi/cargo-semver-checks-action@v2 |
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
{ | ||
"recommendations": [ | ||
"rust-lang.rust-analyzer", | ||
"techtheawesome.rust-yew" | ||
"rust-lang.rust-analyzer" | ||
] | ||
} |
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