Skip to content

Commit 03a0c9a

Browse files
committed
ci: 🐝 initial commit
0 parents  commit 03a0c9a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+4470
-0
lines changed

.github/CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
My name is Rodney. I am a keen developer interested in security and online
2+
privacy. I also love building accessible JAMStack and full stack sites. I am
3+
equally keen to hear your suggestions for improving this project. Thanks for
4+
your interest in the project. Could I ask you to take a look at the project's
5+
Code of Conduct before continuing with your contribution? Thanks! A good
6+
starting point for getting up-to-speed on the project is the README file.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
**Describe the bug** A clear and concise description of what the bug is.
10+
11+
**To Reproduce** Steps to reproduce the behaviour:
12+
13+
1. Go to '...'
14+
2. Click on '....'
15+
3. Scroll down to '....'
16+
4. See error
17+
18+
**Expected behaviour** A clear and concise description of what you expected to
19+
happen.
20+
21+
**Screenshots** If applicable, add screenshots to help explain your problem.
22+
23+
**Desktop (please complete the following information):**
24+
25+
- OS: [e.g. iOS]
26+
- Browser [e.g. chrome, safari]
27+
- Version [e.g. 22]
28+
29+
**Smartphone (please complete the following information):**
30+
31+
- Device: [e.g. iPhone6]
32+
- OS: [e.g. iOS8.1]
33+
- Browser [e.g. stock browser, safari]
34+
- Version [e.g. 22]
35+
36+
**Additional context** Add any other context about the problem here.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.** A clear and
10+
concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe the solution you'd like** A clear and concise description of what you
13+
want to happen.
14+
15+
**Describe alternatives you've considered** A clear and concise description of
16+
any alternative solutions or features you've considered.
17+
18+
**Additional context** Add any other context or screenshots about the feature
19+
request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Description
2+
3+
Please include a summary of the change and which issue is fixed. Please also
4+
include relevant motivation and context. List any dependencies that are required
5+
for this change.
6+
7+
Fixes # (issue)
8+
9+
## Type of change
10+
11+
Please delete options that are not relevant.
12+
13+
- [ ] Bug fix (non-breaking change which fixes an issue)
14+
- [ ] New feature (non-breaking change which adds functionality)
15+
- [ ] Breaking change (fix or feature that would cause existing functionality to
16+
not work as expected)
17+
- [ ] This change requires a documentation update
18+
- [ ] Dependency update
19+
- [ ] CI
20+
21+
# How Has This Been Tested?
22+
23+
Please describe the tests that you ran to verify your changes. Provide
24+
instructions so we can reproduce. Please also list any relevant details for your
25+
test configuration
26+
27+
- [ ] Test A
28+
- [ ] Test B
29+
30+
**Test Configuration**:
31+
32+
- Firmware version:
33+
- Hardware:
34+
- Toolchain:
35+
- SDK:
36+
37+
# Checklist:
38+
39+
- [ ] My code follows the style guidelines of this project
40+
- [ ] I have performed a self-review of my own code
41+
- [ ] I have commented my code, particularly in hard-to-understand areas
42+
- [ ] I have made corresponding changes to the documentation
43+
- [ ] My changes generate no new warnings
44+
- [ ] I have added tests that prove my fix is effective or that my feature works
45+
- [ ] New and existing unit tests pass locally with my changes
46+
- [ ] Any dependent changes have been merged and published in downstream modules

.github/SECURITY.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# SecurityPolicies and Procedures
2+
3+
## Reporting a Bug
4+
5+
The Rodney Lab team and community take all security bugs in Rodney Lab repos
6+
seriously. Thank you for improving the security of Rodney Lab repos. We
7+
appreciate your efforts and responsible disclosure and will make every effort to
8+
acknowledge your contributions.
9+
10+
Report security bugs by emailing [email protected].
11+
12+
You can encrypt your message
13+
<a arai-label="Downloaf P G P key" href="https://rodneylab.com/0xF3AC300FB4F159FE7827612473FCBF24CF9396A7-pub.asc">using
14+
this PGP public key</a>.
15+
16+
That account will acknowledge your email within 48 hours, and will send a more
17+
detailed response within 48 hours indicating the next steps in handling your
18+
report. After the initial reply to your report, we will endeavour to keep you
19+
informed of the progress towards a fix and full announcement, and may ask for
20+
additional information or guidance.
21+
22+
## Disclosure Policy
23+
24+
When we receive a security bug report, we will assign it to a primary handler.
25+
This person will coordinate the fix and release process, involving the following
26+
steps:
27+
28+
- Confirm the problem and determine the affected versions.
29+
- Audit code to find any potential similar problems.
30+
- Prepare fixes for all releases still under maintenance. These fixes will be
31+
released as fast as possible.
32+
33+
## Comments on this Policy
34+
35+
If you have suggestions on how this process could be improved please submit a
36+
pull request.

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
- package-ecosystem: cargo
8+
directory: /
9+
schedule:
10+
interval: weekly
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Security audit
2+
permissions:
3+
contents: read
4+
on:
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
14+
- uses: rustsec/audit-check@69366f33c96575abad1ee0dba8212993eecbe998 # v2.0.0
15+
with:
16+
token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Dependency Review Action
2+
#
3+
# This Action will scan dependency manifest files that change as part of a Pull Request,
4+
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
5+
# Once installed, if the workflow run is marked as required,
6+
# PRs introducing known-vulnerable packages will be blocked from merging.
7+
#
8+
# Source repository: https://github.com/actions/dependency-review-action
9+
name: 'Dependency Review'
10+
on: [pull_request]
11+
permissions:
12+
contents: read
13+
jobs:
14+
dependency-review:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Harden Runner
18+
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
19+
with:
20+
egress-policy: audit
21+
disable-telemetry: true
22+
- name: 'Checkout Repository'
23+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
24+
- name: 'Dependency Review'
25+
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0

.github/workflows/general.yml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: Rust
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
types: [opened, synchronize, reopened]
8+
branches:
9+
- main
10+
permissions: read-all
11+
env:
12+
CARGO_TERM_COLOR: always
13+
RUSTFLAGS: "-Dwarnings -Cinstrument-coverage"
14+
LLVM_PROFILE_FILE: "rust_crate_diffs%p-%m.profraw"
15+
jobs:
16+
test:
17+
name: Test
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Harden Runner
21+
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
22+
with:
23+
egress-policy: audit
24+
disable-telemetry: true
25+
- name: Install Linux Dependencies
26+
run: sudo apt-get update
27+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
- uses: dtolnay/rust-toolchain@4f647fc679bcd3b11499ccb42104547c83dabe96 # stable
29+
- name: Run tests
30+
run: cargo test
31+
fmt:
32+
name: Rustfmt
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Harden Runner
36+
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
37+
with:
38+
egress-policy: audit
39+
disable-telemetry: true
40+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
41+
- uses: dtolnay/rust-toolchain@4f647fc679bcd3b11499ccb42104547c83dabe96 # stable
42+
with:
43+
components: rustfmt
44+
- name: Enforce formatting
45+
run: cargo fmt --check
46+
fmt-dprint:
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Harden Runner
50+
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
51+
with:
52+
egress-policy: audit
53+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
54+
- uses: dprint/check@2f1cf31537886c3bfb05591c031f7744e48ba8a1 # v2.2
55+
clippy:
56+
name: Clippy
57+
runs-on: ubuntu-latest
58+
steps:
59+
- name: Harden Runner
60+
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
61+
with:
62+
egress-policy: audit
63+
disable-telemetry: true
64+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
65+
- uses: dtolnay/rust-toolchain@4f647fc679bcd3b11499ccb42104547c83dabe96 # stable
66+
with:
67+
components: clippy
68+
- name: Linting
69+
run: cargo clippy -- -D warnings
70+
msrv:
71+
runs-on: ubuntu-latest
72+
strategy:
73+
matrix:
74+
msrv: ["1.74.0"]
75+
name: ubuntu / ${{ matrix.msrv }}
76+
steps:
77+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
78+
- name: Install Linux Dependencies
79+
run: sudo apt-get update
80+
- name: Install ${{ matrix.msrv }}
81+
uses: dtolnay/rust-toolchain@4f647fc679bcd3b11499ccb42104547c83dabe96 # stable
82+
with:
83+
toolchain: ${{ matrix.msrv }}
84+
- name: cargo +${{ matrix.msrv }} check
85+
run: cargo check
86+
coverage:
87+
name: Code coverage
88+
runs-on: ubuntu-latest
89+
steps:
90+
- name: Harden Runner
91+
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
92+
with:
93+
egress-policy: audit
94+
disable-telemetry: true
95+
- name: Install Linux Dependencies
96+
run: sudo apt-get update
97+
- name: Checkout repository
98+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
99+
- uses: dtolnay/rust-toolchain@4f647fc679bcd3b11499ccb42104547c83dabe96 # stable
100+
with:
101+
components: llvm-tools-preview
102+
- name: Install grcov
103+
run: cargo install grcov
104+
- name: Build
105+
run: cargo build
106+
- name: Run tests
107+
run: cargo test
108+
- name: Generate code coverage
109+
run: grcov . -s . --binary-path ./target/debug/ -t lcov --branch --ignore-not-existing -o ./target/debug/
110+
- name: Upload coverage reports to Codecov
111+
uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
112+
with:
113+
files: ./target/debug/lcov
114+
env:
115+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/links.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Links
2+
on: [push, pull_request]
3+
permissions:
4+
contents: read
5+
jobs:
6+
linkChecker:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Harden Runner
10+
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
11+
with:
12+
egress-policy: audit
13+
disable-telemetry: true
14+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
15+
- name: Restore lychee cache
16+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
17+
with:
18+
path: .lycheecache
19+
key: cache-lychee-${{ github.sha }}
20+
restore-keys: cache-lychee-
21+
- name: Run lychee
22+
uses: lycheeverse/lychee-action@f81112d0d2814ded911bd23e3beaa9dda9093915 # v2.1.0
23+
with:
24+
args: "--base . --cache --max-cache-age 1d --exclude-path \"deny.toml\" . \"**/*.toml\" \"**/*.rs\" \"**/*.yml\""
25+
fail: true

0 commit comments

Comments
 (0)