File tree Expand file tree Collapse file tree 7 files changed +108
-12
lines changed
Expand file tree Collapse file tree 7 files changed +108
-12
lines changed Original file line number Diff line number Diff line change 66 commitMessageLowerCase : 'never' ,
77 configMigration : true ,
88 dependencyDashboard : true ,
9+ "pre-commit" : {
10+ enabled : true
11+ } ,
912 customManagers : [
1013 {
1114 customType : 'regex' ,
2528 packageNameTemplate : 'rust-lang/rust' ,
2629 datasourceTemplate : 'github-releases' ,
2730 } ,
31+ {
32+ customType : 'regex' ,
33+ managerFilePatterns : [
34+ '/^\\.github/workflows/pre-commit.yml$/' ,
35+ ] ,
36+ matchStrings : [
37+ 'prek-version.*?(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)' ,
38+ ] ,
39+ depNameTemplate : 'prek' ,
40+ packageNameTemplate : 'j178/prek' ,
41+ datasourceTemplate : 'github-releases' ,
42+ } ,
2843 ] ,
2944 packageRules : [
3045 {
4156 ] ,
4257 automerge : true ,
4358 } ,
59+ {
60+ commitMessageTopic : 'Prek' ,
61+ matchManagers : [
62+ 'custom.regex' ,
63+ ] ,
64+ matchDepNames : [
65+ 'prek' ,
66+ ] ,
67+ extractVersion : '^(?<version>\\d+\\.\\d+\\.\\d+)' ,
68+ schedule : [
69+ '* * * * *' ,
70+ ] ,
71+ automerge : true ,
72+ } ,
4473 // Goals:
4574 // - Keep version reqs low, ignoring compatible normal/build dependencies
4675 // - Take advantage of latest dev-dependencies
Original file line number Diff line number Diff line change 5858 run : cargo run --example default
5959 msrv :
6060 name : " Check MSRV"
61- runs-on : ubuntu-latest
61+ strategy :
62+ matrix :
63+ os : ["ubuntu-latest"]
64+ runs-on : ${{ matrix.os }}
6265 steps :
6366 - name : Checkout repository
6467 uses : actions/checkout@v6
7275 run : cargo hack check --each-feature --locked --rust-version --ignore-private --workspace --all-targets --keep-going
7376 minimal-versions :
7477 name : Minimal versions
75- runs-on : ubuntu-latest
78+ strategy :
79+ matrix :
80+ os : ["ubuntu-latest"]
81+ runs-on : ${{ matrix.os }}
7682 steps :
7783 - name : Checkout repository
7884 uses : actions/checkout@v6
@@ -128,7 +134,7 @@ jobs:
128134 components : rustfmt
129135 - uses : Swatinem/rust-cache@v2
130136 - name : Check formatting
131- run : cargo fmt --all -- -- check
137+ run : cargo fmt --check
132138 clippy :
133139 name : clippy
134140 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 2323 runs-on : ubuntu-latest
2424 steps :
2525 - uses : actions/checkout@v6
26- - uses : actions/setup-python@v6
26+ - uses : j178/prek-action@v1
2727 with :
28- python-version : ' 3.x'
29- - uses : pre-commit/action@v3.0.1
28+ prek-version : ' 0.2.27'
Original file line number Diff line number Diff line change 4848 run : cargo run --example default
4949 latest :
5050 name : " Check latest dependencies"
51- runs-on : ubuntu-latest
51+ strategy :
52+ matrix :
53+ os : ["ubuntu-latest"]
54+ runs-on : ${{ matrix.os }}
55+ env :
56+ CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS : allow
5257 steps :
5358 - name : Checkout repository
5459 uses : actions/checkout@v6
Original file line number Diff line number Diff line change 1+ name : Template Update
2+
3+ permissions :
4+ contents : read
5+
6+ on :
7+ schedule :
8+ - cron : ' 1 1 1 * *'
9+ workflow_dispatch :
10+
11+ env :
12+ RUST_BACKTRACE : 1
13+ CARGO_TERM_COLOR : always
14+ CLICOLOR : 1
15+ TEMPLATE_URL : " https://github.com/epage/_rust.git"
16+ TEMPLATE_BRANCH : " main"
17+
18+ concurrency :
19+ group : " ${{ github.workflow }}-${{ github.ref }}"
20+ cancel-in-progress : true
21+
22+ jobs :
23+ update :
24+ permissions :
25+ security-events : write # to create PR
26+ pull-requests : write
27+ contents : write # to push the branch
28+ runs-on : ubuntu-latest
29+ steps :
30+ - name : Checkout repository
31+ uses : actions/checkout@v6
32+ with :
33+ fetch-depth : 0
34+ - name : Configure git
35+ run : |
36+ git config --global user.name '${{ github.actor }}'
37+ git config --global user.email '<>'
38+ - name : Fetch template
39+ run : " git remote add template ${{ env.TEMPLATE_URL }} && git fetch template ${{ env.TEMPLATE_BRANCH }}"
40+ - name : Merge template
41+ run : " git checkout -b template-update && git merge template/${{ env.TEMPLATE_BRANCH }} -m 'chore: Update from template'"
42+ - name : Clear any existing branch
43+ run : " git push origin --delete template-update"
44+ continue-on-error : true
45+ env :
46+ GH_TOKEN : ${{ github.token }}
47+ - name : Push branch
48+ run : " git push --set-upstream origin template-update"
49+ env :
50+ GH_TOKEN : ${{ github.token }}
51+ - name : Create PR
52+ run : " gh pr create --head template-update --title 'chore: Update from template' --body ''"
53+ env :
54+ GH_TOKEN : ${{ github.token }}
55+ - name : Merge PR
56+ run : " gh pr merge --auto --delete-branch"
57+ env :
58+ GH_TOKEN : ${{ github.token }}
Original file line number Diff line number Diff line change 11default_install_hook_types : ["pre-commit", "commit-msg"]
22repos :
33 - repo : https://github.com/pre-commit/pre-commit-hooks
4- rev : v5 .0.0
4+ rev : v6 .0.0
55 hooks :
66 - id : check-yaml
77 - id : check-json
@@ -10,10 +10,10 @@ repos:
1010 - id : check-case-conflict
1111 - id : detect-private-key
1212 - repo : https://github.com/crate-ci/typos
13- rev : v1.32.0
13+ rev : v1.42.1
1414 hooks :
1515 - id : typos
1616 - repo : https://github.com/crate-ci/committed
17- rev : v1.1.7
17+ rev : v1.1.10
1818 hooks :
1919 - id : committed
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ create_dir = "warn"
3535dbg_macro = " warn"
3636debug_assert_with_mut_call = " warn"
3737doc_markdown = " warn"
38- empty_enum = " warn"
38+ empty_enums = " warn"
3939enum_glob_use = " warn"
4040expl_impl_clone_on_copy = " warn"
4141explicit_deref_methods = " warn"
@@ -79,7 +79,6 @@ str_to_string = "warn"
7979string_add = " warn"
8080string_add_assign = " warn"
8181string_lit_as_bytes = " warn"
82- string_to_string = " warn"
8382todo = " warn"
8483trait_duplication_in_bounds = " warn"
8584uninlined_format_args = " warn"
You can’t perform that action at this time.
0 commit comments