-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #585 from epage/template
chore: Adopt _rust template
- Loading branch information
Showing
80 changed files
with
1,603 additions
and
801 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
msrv = "1.46" | ||
allow-print-in-tests = true | ||
allow-expect-in-tests = true | ||
allow-unwrap-in-tests = true | ||
allow-dbg-in-tests = true | ||
# disallowed-methods = [ | ||
# { path = "std::option::Option::map_or", reason = "prefer `map(..).unwrap_or(..)` for legibility" }, | ||
# { path = "std::option::Option::map_or_else", reason = "prefer `map(..).unwrap_or_else(..)` for legibility" }, | ||
# { path = "std::result::Result::map_or", reason = "prefer `map(..).unwrap_or(..)` for legibility" }, | ||
# { path = "std::result::Result::map_or_else", reason = "prefer `map(..).unwrap_or_else(..)` for legibility" }, | ||
# { path = "std::iter::Iterator::for_each", reason = "prefer `for` for side-effects" }, | ||
# { path = "std::iter::Iterator::try_for_each", reason = "prefer `for` for side-effects" }, | ||
# ] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
{ | ||
schedule: [ | ||
'before 5am on the first day of the month', | ||
], | ||
semanticCommits: 'enabled', | ||
commitMessageLowerCase: 'never', | ||
configMigration: true, | ||
dependencyDashboard: true, | ||
customManagers: [ | ||
{ | ||
customType: 'regex', | ||
fileMatch: [ | ||
'^rust-toolchain\\.toml$', | ||
'Cargo.toml$', | ||
'clippy.toml$', | ||
'\\.clippy.toml$', | ||
'^\\.github/workflows/ci.yml$', | ||
'^\\.github/workflows/rust-next.yml$', | ||
], | ||
matchStrings: [ | ||
'STABLE.*?(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)', | ||
'(?<currentValue>\\d+\\.\\d+(\\.\\d+)?).*?STABLE', | ||
], | ||
depNameTemplate: 'STABLE', | ||
packageNameTemplate: 'rust-lang/rust', | ||
datasourceTemplate: 'github-releases', | ||
}, | ||
], | ||
packageRules: [ | ||
{ | ||
commitMessageTopic: 'Rust Stable', | ||
matchManagers: [ | ||
'custom.regex', | ||
], | ||
matchDepNames: [ | ||
'STABLE', | ||
], | ||
extractVersion: '^(?<version>\\d+\\.\\d+)', // Drop the patch version | ||
schedule: [ | ||
'* * * * *', | ||
], | ||
automerge: true, | ||
}, | ||
// Goals: | ||
// - Keep version reqs low, ignoring compatible normal/build dependencies | ||
// - Take advantage of latest dev-dependencies | ||
// - Rollup safe upgrades to reduce CI runner load | ||
// - Help keep number of versions down by always using latest breaking change | ||
// - Have lockfile and manifest in-sync | ||
{ | ||
matchManagers: [ | ||
'cargo', | ||
], | ||
matchDepTypes: [ | ||
'build-dependencies', | ||
'dependencies', | ||
], | ||
matchCurrentVersion: '>=0.1.0', | ||
matchUpdateTypes: [ | ||
'patch', | ||
], | ||
enabled: false, | ||
}, | ||
{ | ||
matchManagers: [ | ||
'cargo', | ||
], | ||
matchDepTypes: [ | ||
'build-dependencies', | ||
'dependencies', | ||
], | ||
matchCurrentVersion: '>=1.0.0', | ||
matchUpdateTypes: [ | ||
'minor', | ||
'patch', | ||
], | ||
enabled: false, | ||
}, | ||
{ | ||
matchManagers: [ | ||
'cargo', | ||
], | ||
matchDepTypes: [ | ||
'dev-dependencies', | ||
], | ||
matchCurrentVersion: '>=0.1.0', | ||
matchUpdateTypes: [ | ||
'patch', | ||
], | ||
automerge: true, | ||
groupName: 'compatible (dev)', | ||
}, | ||
{ | ||
matchManagers: [ | ||
'cargo', | ||
], | ||
matchDepTypes: [ | ||
'dev-dependencies', | ||
], | ||
matchCurrentVersion: '>=1.0.0', | ||
matchUpdateTypes: [ | ||
'minor', | ||
'patch', | ||
], | ||
automerge: true, | ||
groupName: 'compatible (dev)', | ||
}, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# These settings are synced to GitHub by https://probot.github.io/apps/settings/ | ||
|
||
repository: | ||
description: "⚙️ Layered configuration system for Rust applications (with strong support for 12-factor applications). " | ||
homepage: "https://docs.rs/config/latest/config/" | ||
topics: "" | ||
has_issues: true | ||
has_projects: false | ||
has_wiki: false | ||
has_downloads: true | ||
default_branch: main | ||
|
||
# Preference: people do clean commits | ||
allow_merge_commit: true | ||
# Backup in case we need to clean up commits | ||
allow_squash_merge: true | ||
# Not really needed | ||
allow_rebase_merge: false | ||
|
||
allow_auto_merge: true | ||
delete_branch_on_merge: true | ||
|
||
squash_merge_commit_title: "PR_TITLE" | ||
squash_merge_commit_message: "PR_BODY" | ||
merge_commit_message: "PR_BODY" | ||
|
||
# labels: | ||
# # Type | ||
# - name: bug | ||
# color: '#b60205' | ||
# description: "Not as expected" | ||
# - name: enhancement | ||
# color: '#1d76db' | ||
# description: "Improve the expected" | ||
# # Flavor | ||
# - name: question | ||
# color: "#cc317c" | ||
# description: "Uncertainty is involved" | ||
# - name: breaking-change | ||
# color: "#e99695" | ||
# - name: good first issue | ||
# color: '#c2e0c6' | ||
# description: "Help wanted!" | ||
|
||
# This serves more as documentation. | ||
# Branch protection API was replaced by rulesets but settings isn't updated. | ||
# See https://github.com/repository-settings/app/issues/825 | ||
# | ||
# branches: | ||
# - name: main | ||
# protection: | ||
# required_pull_request_reviews: null | ||
# required_conversation_resolution: true | ||
# required_status_checks: | ||
# # Required. Require branches to be up to date before merging. | ||
# strict: false | ||
# contexts: ["CI", "Spell Check with Typos"] | ||
# enforce_admins: false | ||
# restrictions: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Security audit | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- '**/Cargo.toml' | ||
- '**/Cargo.lock' | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
RUST_BACKTRACE: 1 | ||
CARGO_TERM_COLOR: always | ||
CLICOLOR: 1 | ||
|
||
concurrency: | ||
group: "${{ github.workflow }}-${{ github.ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
security_audit: | ||
permissions: | ||
issues: write # to create issues (actions-rs/audit-check) | ||
checks: write # to create check (actions-rs/audit-check) | ||
runs-on: ubuntu-latest | ||
# Prevent sudden announcement of a new advisory from failing ci: | ||
continue-on-error: true | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- uses: actions-rs/audit-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
cargo_deny: | ||
permissions: | ||
issues: write # to create issues (actions-rs/audit-check) | ||
checks: write # to create check (actions-rs/audit-check) | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
checks: | ||
- bans licenses sources | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: EmbarkStudios/cargo-deny-action@v2 | ||
with: | ||
command: check ${{ matrix.checks }} | ||
rust-version: stable |
Oops, something went wrong.