Skip to content

Commit

Permalink
macos-latest and macos-latest-xl should cause conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Jun 3, 2023
1 parent 3a259d7 commit 1190cb6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
10 changes: 6 additions & 4 deletions rule_runner_label.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ const (
compatMacOS1015
compatMacOS110
compatMacOS120
compatMacOS120XL
compatMacOS130
compatMacOS130XL
compatWindows2016
compatWindows2019
compatWindows2022
Expand Down Expand Up @@ -63,12 +65,12 @@ var defaultRunnerOSCompats = map[string]runnerOSCompat{
"ubuntu-22.04": compatUbuntu2204,
"ubuntu-20.04": compatUbuntu2004,
"ubuntu-18.04": compatUbuntu1804,
"macos-13-xl": compatMacOS130,
"macos-13-xl": compatMacOS130XL,
"macos-13": compatMacOS130,
"macos-13.0": compatMacOS130,
"macos-latest-xl": compatMacOS120,
"macos-latest-xl": compatMacOS120XL,
"macos-latest": compatMacOS120,
"macos-12-xl": compatMacOS120,
"macos-12-xl": compatMacOS120XL,
"macos-12": compatMacOS120,
"macos-12.0": compatMacOS120,
"macos-11": compatMacOS110,
Expand All @@ -79,7 +81,7 @@ var defaultRunnerOSCompats = map[string]runnerOSCompat{
"windows-2019": compatWindows2019,
"windows-2016": compatWindows2016,
"linux": compatUbuntu2204 | compatUbuntu2004 | compatUbuntu1804, // Note: "linux" does not always indicate Ubuntu. It might be Fedora or Arch or ...
"macos": compatMacOS130 | compatMacOS120 | compatMacOS110 | compatMacOS1015,
"macos": compatMacOS130 | compatMacOS130XL | compatMacOS120 | compatMacOS120XL | compatMacOS110 | compatMacOS1015,
"windows": compatWindows2022 | compatWindows2019 | compatWindows2016,
}

Expand Down
5 changes: 5 additions & 0 deletions rule_runner_label_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ func TestRuleRunnerLabelCheckLabels(t *testing.T) {
labels: []string{"macos-11", "macos-12"},
errs: []string{`label "macos-12" conflicts with label "macos-11"`},
},
{
what: "macOS XL and normal labels conflict",
labels: []string{"macos-13-xl", "macos-13"},
errs: []string{`label "macos-13" conflicts with label "macos-13-xl"`},
},
// TODO: Add error tests for 'include:'
}

Expand Down

0 comments on commit 1190cb6

Please sign in to comment.