Skip to content
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
5 changes: 5 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
coverage:
status:
project:
default:
threshold: 1%
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "cargo" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
reviewers:
- jessfraz
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
reviewers:
- jessfraz
39 changes: 39 additions & 0 deletions .github/workflows/cargo-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
on:
push:
paths:
- "**.rs"
- Cargo.toml
- Cargo.lock
- .github/workflows/cargo-build.yml
name: cargo build
jobs:
cargobuild:
name: cargo build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install latest rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Cache cargo registry
uses: actions/[email protected]
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/[email protected]
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/[email protected]
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Run cargo build
run: |
cargo build --all
shell: bash
55 changes: 55 additions & 0 deletions .github/workflows/cargo-clippy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
on:
push:
branches:
- main
paths:
- "**.rs"
- Cargo.toml
- Cargo.lock
- .github/workflows/cargo-clippy.yml
- "rust-toolchain"
- "rust-toolchain.toml"
pull_request:
paths:
- "**.rs"
- Cargo.toml
- Cargo.lock
- .github/workflows/cargo-clippy.yml
- "rust-toolchain"
- "rust-toolchain.toml"
name: cargo clippy
permissions:
contents: write
jobs:
cargoclippy:
name: cargo clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install latest rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy

- name: Rust Cache
uses: Swatinem/[email protected]

- name: Check workflow permissions
id: check_permissions
uses: scherermichael-oss/[email protected]
with:
required-permission: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- if: steps.check_permissions.outputs.has-permission
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all
- name: Run clippy manually without annotations
if: ${{ !steps.check_permissions.outputs.has-permission }}
run: cargo clippy --all --all-features -- -D warnings
40 changes: 40 additions & 0 deletions .github/workflows/cargo-fmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
on:
push:
branches:
- main
paths:
- "**.rs"
- "rust-toolchain"
- "rust-toolchain.toml"
- .github/workflows/cargo-fmt.yml
pull_request:
paths:
- "**.rs"
- "rust-toolchain"
- "rust-toolchain.toml"
- .github/workflows/cargo-fmt.yml
permissions:
packages: read
contents: read
name: cargo fmt
jobs:
cargofmt:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install latest rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy

- name: Rust Cache
uses: Swatinem/[email protected]

- name: Run cargo fmt
run: |
cargo fmt --all -- --check
shell: bash
51 changes: 51 additions & 0 deletions .github/workflows/cargo-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
on:
push:
branches:
- main
paths:
- "**.rs"
- Cargo.toml
- Cargo.lock
- .github/workflows/cargo-test.yml
pull_request:
paths:
- "**.rs"
- Cargo.toml
- Cargo.lock
- .github/workflows/cargo-test.yml
workflow_dispatch:
permissions: read-all
name: cargo test
jobs:
cargotest:
name: cargo test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install latest rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: taiki-e/install-action@nextest

- name: Rust Cache
uses: Swatinem/[email protected]

- name: cargo test
shell: bash
run: |
cargo build --all
cargo nextest run --all --test-threads=1 --no-fail-fast
env:
#- name: Upload to codecov.io
#uses: codecov/codecov-action@v3
#with:
#token: ${{secrets.CODECOV_TOKEN}}
# fail_ci_if_error: true
#flags: unittests
#verbose: true
# files: lcov.info
Loading
Loading