-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(fix): modernise CI and remove warnings (#67)
* ci(fix): modernise CI and remove warnings * ci(fix): add ependabot
- Loading branch information
Showing
5 changed files
with
80 additions
and
49 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,8 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
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 |
---|---|---|
@@ -1,14 +1,18 @@ | ||
--- | ||
name: Security audit | ||
on: | ||
|
||
'on': | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: "43 04 * * *" | ||
|
||
jobs: | ||
security_audit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/audit-check@v1 | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: rustsec/audit-check@v1.4.1 | ||
with: | ||
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 |
---|---|---|
@@ -1,75 +1,80 @@ | ||
--- | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
'on': [push, pull_request] | ||
|
||
env: | ||
toolchain: nightly-2022-11-03 | ||
|
||
jobs: | ||
clippy: | ||
name: clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: "true" | ||
|
||
- name: toolchain | ||
uses: actions-rs/toolchain@v1 | ||
uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
toolchain: nightly-2022-11-03 | ||
profile: minimal | ||
toolchain: ${{ env.toolchain }} | ||
components: rustfmt, clippy | ||
override: true | ||
- uses: Swatinem/rust-cache@v1 | ||
|
||
- name: Cache rust dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: cargo fmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
- name: install cargo lints | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: install | ||
args: cargo-lints | ||
- name: cargo lints clippy | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: lints | ||
args: clippy | ||
run: | | ||
cargo +${{ env.toolchain }} fmt --all -- --check | ||
- name: Install cargo-lints | ||
run: | | ||
cargo install cargo-lints | ||
- name: Clippy check (with lints) | ||
run: | | ||
cargo lints clippy --all-targets --all-features | ||
build: | ||
name: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: "true" | ||
|
||
- name: toolchain | ||
uses: actions-rs/toolchain@v1 | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
- uses: Swatinem/rust-cache@v1 | ||
|
||
- name: Cache rust dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: cargo build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release | ||
run: | | ||
cargo build --release | ||
test: | ||
name: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: "true" | ||
|
||
- name: toolchain | ||
uses: actions-rs/toolchain@v1 | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
- uses: Swatinem/rust-cache@v1 | ||
|
||
- name: Cache rust dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: cargo test | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
run: | | ||
cargo test |
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 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