Skip to content

Commit 7295ab4

Browse files
committed
chore: Update from template
2 parents 2769ed8 + 51de731 commit 7295ab4

File tree

21 files changed

+212
-53
lines changed

21 files changed

+212
-53
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.70.0" # 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: 9 additions & 7 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
],
3435
matchPackageNames: [
35-
'rust',
36+
'STABLE',
3637
],
37-
minimumReleaseAge: '252 days', // 6 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
@@ -48,14 +48,18 @@ labels:
4848
color: '#c2e0c6'
4949
description: "Help wanted!"
5050

51-
branches:
52-
- name: main
53-
protection:
54-
required_pull_request_reviews: null
55-
required_conversation_resolution: true
56-
required_status_checks:
57-
# Required. Require branches to be up to date before merging.
58-
strict: false
59-
contexts: ["CI", "Lint Commits", "Spell Check with Typos"]
60-
enforce_admins: false
61-
restrictions: null
51+
# This serves more as documentation.
52+
# Branch protection API was replaced by rulesets but settings isn't updated.
53+
# See https://github.com/repository-settings/app/issues/825
54+
#
55+
# branches:
56+
# - name: main
57+
# protection:
58+
# required_pull_request_reviews: null
59+
# required_conversation_resolution: true
60+
# required_status_checks:
61+
# # Required. Require branches to be up to date before merging.
62+
# strict: false
63+
# contexts: ["CI", "Spell Check with Typos"]
64+
# enforce_admins: false
65+
# restrictions: null

.github/workflows/audit.yml

Lines changed: 4 additions & 0 deletions
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:

.github/workflows/ci.yml

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,27 @@ 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]
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:
3036
matrix:
31-
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
37+
os: ["ubuntu-latest", "windows-latest", "macos-14"]
3238
rust: ["stable"]
3339
continue-on-error: ${{ matrix.rust != 'stable' }}
3440
runs-on: ${{ matrix.os }}
@@ -49,22 +55,23 @@ jobs:
4955
- name: No-default features
5056
run: cargo test --workspace --no-default-features
5157
msrv:
52-
name: "Check MSRV: 1.70.0"
58+
name: "Check MSRV"
5359
runs-on: ubuntu-latest
5460
steps:
5561
- name: Checkout repository
5662
uses: actions/checkout@v4
5763
- name: Install Rust
5864
uses: dtolnay/rust-toolchain@stable
5965
with:
60-
toolchain: "1.70" # MSRV
66+
toolchain: stable
6167
- uses: Swatinem/rust-cache@v2
68+
- uses: taiki-e/install-action@cargo-hack
6269
- name: Default features
63-
run: cargo check --workspace --all-targets
70+
run: cargo hack check --locked --rust-version --ignore-private --workspace --all-targets
6471
- name: All features
65-
run: cargo check --workspace --all-targets --all-features
72+
run: cargo hack check --all-features --locked --rust-version --ignore-private --workspace --all-targets
6673
- name: No-default features
67-
run: cargo check --workspace --all-targets --no-default-features
74+
run: cargo hack check --no-default-features --locked --rust-version --ignore-private --workspace --all-targets
6875
lockfile:
6976
runs-on: ubuntu-latest
7077
steps:
@@ -76,7 +83,7 @@ jobs:
7683
toolchain: stable
7784
- uses: Swatinem/rust-cache@v2
7885
- name: "Is lockfile updated?"
79-
run: cargo fetch --locked
86+
run: cargo update --workspace --locked
8087
docs:
8188
name: Docs
8289
runs-on: ubuntu-latest
@@ -86,7 +93,7 @@ jobs:
8693
- name: Install Rust
8794
uses: dtolnay/rust-toolchain@stable
8895
with:
89-
toolchain: stable
96+
toolchain: "1.76" # STABLE
9097
- uses: Swatinem/rust-cache@v2
9198
- name: Check documentation
9299
env:
@@ -101,9 +108,7 @@ jobs:
101108
- name: Install Rust
102109
uses: dtolnay/rust-toolchain@stable
103110
with:
104-
# Not MSRV because its harder to jump between versions and people are
105-
# more likely to have stable
106-
toolchain: stable
111+
toolchain: "1.76" # STABLE
107112
components: rustfmt
108113
- uses: Swatinem/rust-cache@v2
109114
- name: Check formatting
@@ -119,13 +124,13 @@ jobs:
119124
- name: Install Rust
120125
uses: dtolnay/rust-toolchain@stable
121126
with:
122-
toolchain: "1.70" # MSRV
127+
toolchain: "1.76" # STABLE
123128
components: clippy
124129
- uses: Swatinem/rust-cache@v2
125130
- name: Install SARIF tools
126-
run: cargo install clippy-sarif --version 0.3.4 --locked # Held back due to msrv
131+
run: cargo install clippy-sarif --locked
127132
- name: Install SARIF tools
128-
run: cargo install sarif-fmt --version 0.3.4 --locked # Held back due to msrv
133+
run: cargo install sarif-fmt --locked
129134
- name: Check
130135
run: >
131136
cargo clippy --workspace --all-features --all-targets --message-format=json -- -D warnings --allow deprecated
@@ -140,3 +145,22 @@ jobs:
140145
wait-for-processing: true
141146
- name: Report status
142147
run: cargo clippy --workspace --all-features --all-targets -- -D warnings --allow deprecated
148+
coverage:
149+
name: Coverage
150+
runs-on: ubuntu-latest
151+
steps:
152+
- name: Checkout repository
153+
uses: actions/checkout@v4
154+
- name: Install Rust
155+
uses: dtolnay/rust-toolchain@stable
156+
with:
157+
toolchain: stable
158+
- uses: Swatinem/rust-cache@v2
159+
- name: Install cargo-tarpaulin
160+
run: cargo install cargo-tarpaulin
161+
- name: Gather coverage
162+
run: cargo tarpaulin --output-dir coverage --out lcov
163+
- name: Publish to Coveralls
164+
uses: coverallsapp/github-action@master
165+
with:
166+
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: 4 additions & 0 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
pre-commit:
1721
permissions:

.github/workflows/rust-next.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ 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
1822
strategy:
1923
matrix:
20-
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
24+
os: ["ubuntu-latest", "windows-latest", "macos-latest", "macos-14"]
2125
rust: ["stable", "beta"]
2226
include:
2327
- os: ubuntu-latest

.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)