Skip to content

Commit 1cdf2fc

Browse files
committed
add language_edition and style-edition to check_diff.yml CI
This will let us test the `check_diff` binary with different combinations of Rust language edition and rustfmt style_edition.
1 parent 09e99b8 commit 1cdf2fc

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/check_diff.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,24 @@ on:
88
branch_name:
99
description: 'Name of the feature branch on the forked repo'
1010
required: true
11+
language_edition:
12+
description: 'Rust language `edition` used to parse code'
13+
required: true
14+
default: 2015
15+
type: choice
16+
options:
17+
- 2015
18+
- 2018
19+
- 2021
20+
- 2024
21+
style_edition:
22+
description: 'rustfmt `style_edition` used when formatting code.'
23+
required: true
24+
default: 2021
25+
type: choice
26+
options:
27+
- 2021 # 2015, 2018, and 2021 are all formatted the same since `style_edition` was added between 2021 and 2024
28+
- 2024
1129
commit_hash:
1230
description: 'Optional commit hash from the feature branch'
1331
required: false
@@ -44,4 +62,6 @@ jobs:
4462
fi
4563
4664
target/release/check_diff ${{ github.event.inputs.clone_url }} ${{ github.event.inputs.branch_name }} \
65+
--edition ${{ github.event.inputs.language_edition }} \
66+
--style-edition ${{ github.event.inputs.style_edition }} \
4767
$OPTIONS

0 commit comments

Comments
 (0)