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: init #5

Merged
merged 1 commit into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 12 additions & 0 deletions .github/dependabot.yml
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"
29 changes: 29 additions & 0 deletions .github/workflows/rust-cargo-deny.yml
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/checkout@v4.1.1

- name: Run cargo-deny
uses: EmbarkStudios/cargo-deny-action@v1
with:
command: --manifest-path=./Cargo.toml check ${{ matrix.checks }}

38 changes: 38 additions & 0 deletions .github/workflows/rust-clippy.yml
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/cancel-workflow-action@0.12.0
with:
access_token: ${{ github.token }}

- name: Checkout sources
uses: actions/checkout@v4.1.1
with:
fetch-depth: 50
submodules: 'recursive'

- name: Install Rust stable toolchain
uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: stable
override: true

- name: Rust Cache
uses: Swatinem/rust-cache@v2.7.1

- name: cargo clippy
run: cargo clippy --all-targets -- -D warnings
35 changes: 35 additions & 0 deletions .github/workflows/rust-fmt.yml
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/cancel-workflow-action@0.12.0
with:
access_token: ${{ github.token }}

- name: Checkout sources
uses: actions/checkout@v4.1.1
with:
fetch-depth: 50
submodules: 'recursive'

- name: Install Rust stable toolchain
uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: stable
override: true

- name: cargo fmt
run: cargo fmt --all -- --check
44 changes: 44 additions & 0 deletions .github/workflows/rust-test.yml
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/cancel-workflow-action@0.12.0
with:
access_token: ${{ github.token }}

- name: Checkout sources
uses: actions/checkout@v4.1.1
with:
fetch-depth: 50
submodules: 'recursive'

- name: Install Rust stable toolchain
uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: stable
override: true

- name: Install cargo-nextest
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-nextest
version: 0.9

- name: Rust Cache
uses: Swatinem/rust-cache@v2.7.1

- name: cargo nextest
run: cargo nextest run
Loading