Skip to content

Commit a42c3a7

Browse files
committed
chore: Update from template
2 parents 104c40d + d159ec5 commit a42c3a7

File tree

28 files changed

+446
-149
lines changed

28 files changed

+446
-149
lines changed

.clippy.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
msrv = "1.76" # MSRV
2-
warn-on-all-wildcard-imports = true
1+
allow-print-in-tests = true
32
allow-expect-in-tests = true
43
allow-unwrap-in-tests = true
54
allow-dbg-in-tests = true

.github/renovate.json5

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
'before 5am on the first day of the month',
44
],
55
semanticCommits: 'enabled',
6+
commitMessageLowerCase: 'never',
67
configMigration: true,
78
dependencyDashboard: true,
89
customManagers: [
@@ -17,29 +18,28 @@
1718
'^\\.github/workflows/rust-next.yml$',
1819
],
1920
matchStrings: [
20-
'MSRV.*?(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)',
21-
'(?<currentValue>\\d+\\.\\d+(\\.\\d+)?).*?MSRV',
21+
'STABLE.*?(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)',
22+
'(?<currentValue>\\d+\\.\\d+(\\.\\d+)?).*?STABLE',
2223
],
23-
depNameTemplate: 'rust',
24+
depNameTemplate: 'STABLE',
2425
packageNameTemplate: 'rust-lang/rust',
2526
datasourceTemplate: 'github-releases',
2627
},
2728
],
2829
packageRules: [
2930
{
30-
commitMessageTopic: 'MSRV',
31+
commitMessageTopic: 'Rust Stable',
3132
matchManagers: [
3233
'custom.regex',
3334
],
34-
matchPackageNames: [
35-
'rust',
35+
matchDepNames: [
36+
'STABLE',
3637
],
37-
minimumReleaseAge: '126 days', // 3 releases * 6 weeks per release * 7 days per week
38-
internalChecksFilter: 'strict',
3938
extractVersion: '^(?<version>\\d+\\.\\d+)', // Drop the patch version
4039
schedule: [
4140
'* * * * *',
4241
],
42+
automerge: true,
4343
},
4444
// Goals:
4545
// - Keep version reqs low, ignoring compatible normal/build dependencies
@@ -72,6 +72,7 @@
7272
matchCurrentVersion: '>=1.0.0',
7373
matchUpdateTypes: [
7474
'minor',
75+
'patch',
7576
],
7677
enabled: false,
7778
},
@@ -99,6 +100,7 @@
99100
matchCurrentVersion: '>=1.0.0',
100101
matchUpdateTypes: [
101102
'minor',
103+
'patch',
102104
],
103105
automerge: true,
104106
groupName: 'compatible (dev)',

.github/settings.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,18 @@ labels:
5959
description: "Call for participation: Help is requested to fix this issue."
6060
color: '#02E10C'
6161

62-
branches:
63-
- name: main
64-
protection:
65-
required_pull_request_reviews: null
66-
required_conversation_resolution: true
67-
required_status_checks:
68-
# Required. Require branches to be up to date before merging.
69-
strict: false
70-
contexts: ["CI", "Lint Commits", "Spell Check with Typos"]
71-
enforce_admins: false
72-
restrictions: null
62+
# This serves more as documentation.
63+
# Branch protection API was replaced by rulesets but settings isn't updated.
64+
# See https://github.com/repository-settings/app/issues/825
65+
#
66+
# branches:
67+
# - name: main
68+
# protection:
69+
# required_pull_request_reviews: null
70+
# required_conversation_resolution: true
71+
# required_status_checks:
72+
# # Required. Require branches to be up to date before merging.
73+
# strict: false
74+
# contexts: ["CI", "Spell Check with Typos"]
75+
# enforce_admins: false
76+
# restrictions: null

.github/workflows/audit.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ env:
1717
CARGO_TERM_COLOR: always
1818
CLICOLOR: 1
1919

20+
concurrency:
21+
group: "${{ github.workflow }}-${{ github.ref }}"
22+
cancel-in-progress: true
23+
2024
jobs:
2125
security_audit:
2226
permissions:
@@ -43,7 +47,7 @@ jobs:
4347
- bans licenses sources
4448
steps:
4549
- uses: actions/checkout@v4
46-
- uses: EmbarkStudios/cargo-deny-action@v1
50+
- uses: EmbarkStudios/cargo-deny-action@v2
4751
with:
4852
command: check ${{ matrix.checks }}
4953
rust-version: stable

.github/workflows/ci.yml

Lines changed: 61 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,22 @@ env:
1414
CARGO_TERM_COLOR: always
1515
CLICOLOR: 1
1616

17+
concurrency:
18+
group: "${{ github.workflow }}-${{ github.ref }}"
19+
cancel-in-progress: true
20+
1721
jobs:
1822
ci:
1923
permissions:
2024
contents: none
2125
name: CI
22-
needs: [test, msrv, docs, rustfmt, clippy]
26+
needs: [test, msrv, lockfile, docs, rustfmt, clippy, minimal-versions]
2327
runs-on: ubuntu-latest
28+
if: "always()"
2429
steps:
25-
- name: Done
26-
run: exit 0
30+
- name: Failed
31+
run: exit 1
32+
if: "contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')"
2733
test:
2834
name: Test
2935
strategy:
@@ -40,31 +46,43 @@ jobs:
4046
with:
4147
toolchain: ${{ matrix.rust }}
4248
- uses: Swatinem/rust-cache@v2
49+
- uses: taiki-e/install-action@cargo-hack
4350
- name: Build
44-
run: cargo test --no-run --workspace --all-features
45-
- name: Default features
46-
run: cargo test --workspace
47-
- name: All features
48-
run: cargo test --workspace --all-features
49-
- name: No-default features
50-
run: cargo test --workspace --no-default-features
51+
run: cargo test --workspace --no-run
52+
- name: Test
53+
run: cargo hack test --feature-powerset --workspace
5154
msrv:
52-
name: "Check MSRV: 1.76"
55+
name: "Check MSRV"
5356
runs-on: ubuntu-latest
5457
steps:
5558
- name: Checkout repository
5659
uses: actions/checkout@v4
5760
- name: Install Rust
5861
uses: dtolnay/rust-toolchain@stable
5962
with:
60-
toolchain: "1.76" # MSRV
63+
toolchain: stable
6164
- uses: Swatinem/rust-cache@v2
65+
- uses: taiki-e/install-action@cargo-hack
6266
- name: Default features
63-
run: cargo check --workspace --all-targets
64-
- name: All features
65-
run: cargo check --workspace --all-targets --all-features
66-
- name: No-default features
67-
run: cargo check --workspace --all-targets --no-default-features
67+
run: cargo hack check --feature-powerset --locked --rust-version --ignore-private --workspace --all-targets
68+
minimal-versions:
69+
name: Minimal versions
70+
runs-on: ubuntu-latest
71+
steps:
72+
- name: Checkout repository
73+
uses: actions/checkout@v4
74+
- name: Install stable Rust
75+
uses: dtolnay/rust-toolchain@stable
76+
with:
77+
toolchain: stable
78+
- name: Install nightly Rust
79+
uses: dtolnay/rust-toolchain@stable
80+
with:
81+
toolchain: nightly
82+
- name: Downgrade dependencies to minimal versions
83+
run: cargo +nightly generate-lockfile -Z minimal-versions
84+
- name: Compile with minimal versions
85+
run: cargo +stable check --workspace --all-features --locked
6886
lockfile:
6987
runs-on: ubuntu-latest
7088
steps:
@@ -76,7 +94,7 @@ jobs:
7694
toolchain: stable
7795
- uses: Swatinem/rust-cache@v2
7896
- name: "Is lockfile updated?"
79-
run: cargo fetch --locked
97+
run: cargo update --workspace --locked
8098
docs:
8199
name: Docs
82100
runs-on: ubuntu-latest
@@ -86,7 +104,7 @@ jobs:
86104
- name: Install Rust
87105
uses: dtolnay/rust-toolchain@stable
88106
with:
89-
toolchain: stable
107+
toolchain: "1.76" # STABLE
90108
- uses: Swatinem/rust-cache@v2
91109
- name: Check documentation
92110
env:
@@ -101,9 +119,7 @@ jobs:
101119
- name: Install Rust
102120
uses: dtolnay/rust-toolchain@stable
103121
with:
104-
# Not MSRV because its harder to jump between versions and people are
105-
# more likely to have stable
106-
toolchain: stable
122+
toolchain: "1.76" # STABLE
107123
components: rustfmt
108124
- uses: Swatinem/rust-cache@v2
109125
- name: Check formatting
@@ -119,16 +135,16 @@ jobs:
119135
- name: Install Rust
120136
uses: dtolnay/rust-toolchain@stable
121137
with:
122-
toolchain: "1.76" # MSRV
138+
toolchain: "1.76" # STABLE
123139
components: clippy
124140
- uses: Swatinem/rust-cache@v2
125141
- name: Install SARIF tools
126-
run: cargo install clippy-sarif --version 0.3.4 --locked # Held back due to msrv
142+
run: cargo install clippy-sarif --locked
127143
- name: Install SARIF tools
128-
run: cargo install sarif-fmt --version 0.3.4 --locked # Held back due to msrv
144+
run: cargo install sarif-fmt --locked
129145
- name: Check
130146
run: >
131-
cargo clippy --workspace --all-features --all-targets --message-format=json -- -D warnings --allow deprecated
147+
cargo clippy --workspace --all-features --all-targets --message-format=json
132148
| clippy-sarif
133149
| tee clippy-results.sarif
134150
| sarif-fmt
@@ -140,3 +156,22 @@ jobs:
140156
wait-for-processing: true
141157
- name: Report status
142158
run: cargo clippy --workspace --all-features --all-targets -- -D warnings --allow deprecated
159+
coverage:
160+
name: Coverage
161+
runs-on: ubuntu-latest
162+
steps:
163+
- name: Checkout repository
164+
uses: actions/checkout@v4
165+
- name: Install Rust
166+
uses: dtolnay/rust-toolchain@stable
167+
with:
168+
toolchain: stable
169+
- uses: Swatinem/rust-cache@v2
170+
- name: Install cargo-tarpaulin
171+
run: cargo install cargo-tarpaulin
172+
- name: Gather coverage
173+
run: cargo tarpaulin --output-dir coverage --out lcov
174+
- name: Publish to Coveralls
175+
uses: coverallsapp/github-action@master
176+
with:
177+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/committed.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ env:
1111
CARGO_TERM_COLOR: always
1212
CLICOLOR: 1
1313

14+
concurrency:
15+
group: "${{ github.workflow }}-${{ github.ref }}"
16+
cancel-in-progress: true
17+
1418
jobs:
1519
committed:
1620
name: Lint Commits

.github/workflows/pre-commit.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ env:
1212
CARGO_TERM_COLOR: always
1313
CLICOLOR: 1
1414

15+
concurrency:
16+
group: "${{ github.workflow }}-${{ github.ref }}"
17+
cancel-in-progress: true
18+
1519
jobs:
1620
pre-commit:
1721
permissions:
@@ -20,4 +24,6 @@ jobs:
2024
steps:
2125
- uses: actions/checkout@v4
2226
- uses: actions/setup-python@v5
23-
- uses: pre-commit/[email protected]
27+
with:
28+
python-version: '3.x'
29+
- uses: pre-commit/[email protected]

.github/workflows/rust-next.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ env:
1212
CARGO_TERM_COLOR: always
1313
CLICOLOR: 1
1414

15+
concurrency:
16+
group: "${{ github.workflow }}-${{ github.ref }}"
17+
cancel-in-progress: true
18+
1519
jobs:
1620
test:
1721
name: Test
@@ -32,12 +36,11 @@ jobs:
3236
with:
3337
toolchain: ${{ matrix.rust }}
3438
- uses: Swatinem/rust-cache@v2
35-
- name: Default features
36-
run: cargo test --workspace
37-
- name: All features
38-
run: cargo test --workspace --all-features
39-
- name: No-default features
40-
run: cargo test --workspace --no-default-features
39+
- uses: taiki-e/install-action@cargo-hack
40+
- name: Build
41+
run: cargo test --workspace --no-run
42+
- name: Test
43+
run: cargo hack test --feature-powerset --workspace
4144
latest:
4245
name: "Check latest dependencies"
4346
runs-on: ubuntu-latest
@@ -49,11 +52,10 @@ jobs:
4952
with:
5053
toolchain: stable
5154
- uses: Swatinem/rust-cache@v2
52-
- name: Update dependencues
55+
- uses: taiki-e/install-action@cargo-hack
56+
- name: Update dependencies
5357
run: cargo update
54-
- name: Default features
55-
run: cargo test --workspace --all-targets
56-
- name: All features
57-
run: cargo test --workspace --all-targets --all-features
58-
- name: No-default features
59-
run: cargo test --workspace --all-targets --no-default-features
58+
- name: Build
59+
run: cargo test --workspace --no-run
60+
- name: Test
61+
run: cargo hack test --feature-powerset --workspace

.github/workflows/spelling.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ env:
1010
CARGO_TERM_COLOR: always
1111
CLICOLOR: 1
1212

13+
concurrency:
14+
group: "${{ github.workflow }}-${{ github.ref }}"
15+
cancel-in-progress: true
16+
1317
jobs:
1418
spelling:
1519
name: Spell Check with Typos

0 commit comments

Comments
 (0)