Skip to content

Commit a8d6b6d

Browse files
committed
Add github workflows
Signed-off-by: Sandro-Alessio Gierens <sandro@gierens.de>
1 parent 0775592 commit a8d6b6d

File tree

3 files changed

+87
-0
lines changed

3 files changed

+87
-0
lines changed

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "cargo" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"
12+
13+
- package-ecosystem: "github-actions"
14+
# Workflow files stored in the
15+
# default location of `.github/workflows`
16+
directory: "/"
17+
schedule:
18+
interval: "weekly"

.github/workflows/audit.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Security audit
2+
on:
3+
schedule:
4+
- cron: '0 0 * * *'
5+
push:
6+
paths:
7+
- '**/Cargo.toml'
8+
- '**/Cargo.lock'
9+
jobs:
10+
security_audit:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: taiki-e/install-action@cargo-deny
15+
- name: Scan for vulnerabilities
16+
run: cargo deny check advisories

.github/workflows/general.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Rust
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
CARGO_TERM_COLOR: always
7+
8+
jobs:
9+
test:
10+
name: Test
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: dtolnay/rust-toolchain@stable
15+
- uses: Swatinem/rust-cache@v2
16+
- name: Run tests
17+
run: cargo test
18+
19+
fmt:
20+
name: Rustfmt
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v3
24+
- uses: dtolnay/rust-toolchain@stable
25+
with:
26+
components: rustfmt
27+
- name: Enforce formatting
28+
run: cargo fmt --check
29+
30+
clippy:
31+
name: Clippy
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v3
35+
- uses: dtolnay/rust-toolchain@stable
36+
with:
37+
components: clippy
38+
- uses: Swatinem/rust-cache@v2
39+
- name: Linting
40+
run: cargo clippy -- -D warnings
41+
42+
coverage:
43+
name: Code coverage
44+
runs-on: ubuntu-latest
45+
container:
46+
image: xd009642/tarpaulin
47+
options: --security-opt seccomp=unconfined
48+
steps:
49+
- name: Checkout repository
50+
uses: actions/checkout@v3
51+
- name: Generate code coverage
52+
run: |
53+
cargo tarpaulin --verbose --workspace

0 commit comments

Comments
 (0)