Skip to content

Commit

Permalink
Merge pull request #2 from Alzymologist/ci-init
Browse files Browse the repository at this point in the history
ci: basic tests
  • Loading branch information
varovainen authored Dec 5, 2023
2 parents 3a60e2c + ad8748b commit 5a06627
Show file tree
Hide file tree
Showing 5 changed files with 158 additions and 0 deletions.
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/[email protected]

- 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/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout sources
uses: actions/[email protected]
with:
fetch-depth: 50
submodules: 'recursive'

- name: Install Rust stable toolchain
uses: actions-rs/[email protected]
with:
profile: minimal
toolchain: stable
override: true

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

- 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/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout sources
uses: actions/[email protected]
with:
fetch-depth: 50
submodules: 'recursive'

- name: Install Rust stable toolchain
uses: actions-rs/[email protected]
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/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout sources
uses: actions/[email protected]
with:
fetch-depth: 50
submodules: 'recursive'

- name: Install Rust stable toolchain
uses: actions-rs/[email protected]
with:
profile: minimal
toolchain: stable
override: true

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

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

- name: cargo nextest
run: cargo nextest run

0 comments on commit 5a06627

Please sign in to comment.