Skip to content

Commit 3f4d73d

Browse files
authored
bump dropshot (#6)
* bump dropshot Signed-off-by: Jess Frazelle <[email protected]> * add workflows Signed-off-by: Jess Frazelle <[email protected]> --------- Signed-off-by: Jess Frazelle <[email protected]>
1 parent b5752df commit 3f4d73d

File tree

8 files changed

+715
-438
lines changed

8 files changed

+715
-438
lines changed

.github/codecov.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
threshold: 1%

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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://help.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: "daily"
12+
reviewers:
13+
- jessfraz
14+
- package-ecosystem: "github-actions" # See documentation for possible values
15+
directory: "/" # Location of package manifests
16+
schedule:
17+
interval: "daily"
18+
reviewers:
19+
- jessfraz

.github/workflows/cargo-build.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
on:
2+
push:
3+
paths:
4+
- "**.rs"
5+
- Cargo.toml
6+
- Cargo.lock
7+
- .github/workflows/cargo-build.yml
8+
name: cargo build
9+
jobs:
10+
cargobuild:
11+
name: cargo build
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Install latest rust
16+
uses: actions-rs/toolchain@v1
17+
with:
18+
toolchain: stable
19+
override: true
20+
components: rustfmt, clippy
21+
- name: Cache cargo registry
22+
uses: actions/[email protected]
23+
with:
24+
path: ~/.cargo/registry
25+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
26+
- name: Cache cargo index
27+
uses: actions/[email protected]
28+
with:
29+
path: ~/.cargo/git
30+
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
31+
- name: Cache cargo build
32+
uses: actions/[email protected]
33+
with:
34+
path: target
35+
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
36+
- name: Run cargo build
37+
run: |
38+
cargo build --all
39+
shell: bash

.github/workflows/cargo-clippy.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
paths:
6+
- "**.rs"
7+
- Cargo.toml
8+
- Cargo.lock
9+
- .github/workflows/cargo-clippy.yml
10+
- "rust-toolchain"
11+
- "rust-toolchain.toml"
12+
pull_request:
13+
paths:
14+
- "**.rs"
15+
- Cargo.toml
16+
- Cargo.lock
17+
- .github/workflows/cargo-clippy.yml
18+
- "rust-toolchain"
19+
- "rust-toolchain.toml"
20+
name: cargo clippy
21+
permissions:
22+
contents: write
23+
jobs:
24+
cargoclippy:
25+
name: cargo clippy
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Install latest rust
31+
uses: actions-rs/toolchain@v1
32+
with:
33+
toolchain: stable
34+
override: true
35+
components: rustfmt, clippy
36+
37+
- name: Rust Cache
38+
uses: Swatinem/[email protected]
39+
40+
- name: Check workflow permissions
41+
id: check_permissions
42+
uses: scherermichael-oss/[email protected]
43+
with:
44+
required-permission: write
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
48+
- if: steps.check_permissions.outputs.has-permission
49+
uses: actions-rs/clippy-check@v1
50+
with:
51+
token: ${{ secrets.GITHUB_TOKEN }}
52+
args: --all
53+
- name: Run clippy manually without annotations
54+
if: ${{ !steps.check_permissions.outputs.has-permission }}
55+
run: cargo clippy --all --all-features -- -D warnings

.github/workflows/cargo-fmt.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
paths:
6+
- "**.rs"
7+
- "rust-toolchain"
8+
- "rust-toolchain.toml"
9+
- .github/workflows/cargo-fmt.yml
10+
pull_request:
11+
paths:
12+
- "**.rs"
13+
- "rust-toolchain"
14+
- "rust-toolchain.toml"
15+
- .github/workflows/cargo-fmt.yml
16+
permissions:
17+
packages: read
18+
contents: read
19+
name: cargo fmt
20+
jobs:
21+
cargofmt:
22+
name: cargo fmt
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Install latest rust
28+
uses: actions-rs/toolchain@v1
29+
with:
30+
toolchain: stable
31+
override: true
32+
components: rustfmt, clippy
33+
34+
- name: Rust Cache
35+
uses: Swatinem/[email protected]
36+
37+
- name: Run cargo fmt
38+
run: |
39+
cargo fmt --all -- --check
40+
shell: bash

.github/workflows/cargo-test.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
paths:
6+
- "**.rs"
7+
- Cargo.toml
8+
- Cargo.lock
9+
- .github/workflows/cargo-test.yml
10+
pull_request:
11+
paths:
12+
- "**.rs"
13+
- Cargo.toml
14+
- Cargo.lock
15+
- .github/workflows/cargo-test.yml
16+
workflow_dispatch:
17+
permissions: read-all
18+
name: cargo test
19+
jobs:
20+
cargotest:
21+
name: cargo test
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Install latest rust
27+
uses: actions-rs/toolchain@v1
28+
with:
29+
toolchain: stable
30+
override: true
31+
components: rustfmt, clippy
32+
- uses: taiki-e/install-action@cargo-llvm-cov
33+
- uses: taiki-e/install-action@nextest
34+
35+
- name: Rust Cache
36+
uses: Swatinem/[email protected]
37+
38+
- name: cargo test
39+
shell: bash
40+
run: |
41+
cargo build --all
42+
cargo nextest run --all --test-threads=1 --no-fail-fast
43+
env:
44+
#- name: Upload to codecov.io
45+
#uses: codecov/codecov-action@v3
46+
#with:
47+
#token: ${{secrets.CODECOV_TOKEN}}
48+
# fail_ci_if_error: true
49+
#flags: unittests
50+
#verbose: true
51+
# files: lcov.info

0 commit comments

Comments
 (0)