Skip to content

Commit

Permalink
Add macos-14 to github hosted runners (#392)
Browse files Browse the repository at this point in the history
* Add macos-14 to github hosted runners

* Fix tests
  • Loading branch information
harryzcy authored Feb 7, 2024
1 parent 0b676b1 commit d99abec
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
13 changes: 13 additions & 0 deletions rule_runner_label.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ const (
compatMacOS130
compatMacOS130L
compatMacOS130XL
compatMacOS140
compatMacOS140L
compatMacOS140XL
compatWindows2016
compatWindows2019
compatWindows2022
Expand All @@ -36,6 +39,11 @@ var allGitHubHostedRunnerLabels = []string{
"macos-latest-xl",
"macos-latest-xlarge",
"macos-latest-large",
"macos-14-xl",
"macos-14-xlarge",
"macos-14-large",
"macos-14",
"macos-14.0",
"macos-13-xl",
"macos-13-xlarge",
"macos-13-large",
Expand Down Expand Up @@ -70,6 +78,11 @@ var defaultRunnerOSCompats = map[string]runnerOSCompat{
"ubuntu-latest": compatUbuntu2204,
"ubuntu-22.04": compatUbuntu2204,
"ubuntu-20.04": compatUbuntu2004,
"macos-14-xl": compatMacOS140XL,
"macos-14-xlarge": compatMacOS140XL,
"macos-14-large": compatMacOS140L,
"macos-14": compatMacOS140,
"macos-14.0": compatMacOS140,
"macos-13-xl": compatMacOS130XL,
"macos-13-xlarge": compatMacOS130XL,
"macos-13-large": compatMacOS130L,
Expand Down
2 changes: 1 addition & 1 deletion testdata/format/test.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"message":"unexpected key \"branch\" for \"push\" section. expected one of \"branches\", \"branches-ignore\", \"paths\", \"paths-ignore\", \"tags\", \"tags-ignore\", \"types\", \"workflows\"","filepath":"testdata/format/test.yaml","line":3,"column":5,"kind":"syntax-check","snippet":" branch: main\n ^~~~~~~","end_column":11},{"message":"label \"linux-latest\" is unknown. available labels are \"windows-latest\", \"windows-2022\", \"windows-2019\", \"windows-2016\", \"ubuntu-latest\", \"ubuntu-22.04\", \"ubuntu-20.04\", \"macos-latest\", \"macos-latest-xl\", \"macos-latest-xlarge\", \"macos-latest-large\", \"macos-13-xl\", \"macos-13-xlarge\", \"macos-13-large\", \"macos-13\", \"macos-13.0\", \"macos-12-xl\", \"macos-12-xlarge\", \"macos-12-large\", \"macos-12\", \"macos-12.0\", \"macos-11\", \"macos-11.0\", \"macos-10.15\", \"self-hosted\", \"x64\", \"arm\", \"arm64\", \"linux\", \"macos\", \"windows\". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file","filepath":"testdata/format/test.yaml","line":6,"column":14,"kind":"runner-label","snippet":" runs-on: linux-latest\n ^~~~~~~~~~~~","end_column":25}]
[{"message":"unexpected key \"branch\" for \"push\" section. expected one of \"branches\", \"branches-ignore\", \"paths\", \"paths-ignore\", \"tags\", \"tags-ignore\", \"types\", \"workflows\"","filepath":"testdata/format/test.yaml","line":3,"column":5,"kind":"syntax-check","snippet":" branch: main\n ^~~~~~~","end_column":11},{"message":"label \"linux-latest\" is unknown. available labels are \"windows-latest\", \"windows-2022\", \"windows-2019\", \"windows-2016\", \"ubuntu-latest\", \"ubuntu-22.04\", \"ubuntu-20.04\", \"macos-latest\", \"macos-latest-xl\", \"macos-latest-xlarge\", \"macos-latest-large\", \"macos-14-xl\", \"macos-14-xlarge\", \"macos-14-large\", \"macos-14\", \"macos-14.0\", \"macos-13-xl\", \"macos-13-xlarge\", \"macos-13-large\", \"macos-13\", \"macos-13.0\", \"macos-12-xl\", \"macos-12-xlarge\", \"macos-12-large\", \"macos-12\", \"macos-12.0\", \"macos-11\", \"macos-11.0\", \"macos-10.15\", \"self-hosted\", \"x64\", \"arm\", \"arm64\", \"linux\", \"macos\", \"windows\". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file","filepath":"testdata/format/test.yaml","line":6,"column":14,"kind":"runner-label","snippet":" runs-on: linux-latest\n ^~~~~~~~~~~~","end_column":25}]
2 changes: 1 addition & 1 deletion testdata/format/test.jsonl
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{"message":"unexpected key \"branch\" for \"push\" section. expected one of \"branches\", \"branches-ignore\", \"paths\", \"paths-ignore\", \"tags\", \"tags-ignore\", \"types\", \"workflows\"","filepath":"testdata/format/test.yaml","line":3,"column":5,"kind":"syntax-check","snippet":" branch: main\n ^~~~~~~","end_column":11}
{"message":"label \"linux-latest\" is unknown. available labels are \"windows-latest\", \"windows-2022\", \"windows-2019\", \"windows-2016\", \"ubuntu-latest\", \"ubuntu-22.04\", \"ubuntu-20.04\", \"macos-latest\", \"macos-latest-xl\", \"macos-latest-xlarge\", \"macos-latest-large\", \"macos-13-xl\", \"macos-13-xlarge\", \"macos-13-large\", \"macos-13\", \"macos-13.0\", \"macos-12-xl\", \"macos-12-xlarge\", \"macos-12-large\", \"macos-12\", \"macos-12.0\", \"macos-11\", \"macos-11.0\", \"macos-10.15\", \"self-hosted\", \"x64\", \"arm\", \"arm64\", \"linux\", \"macos\", \"windows\". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file","filepath":"testdata/format/test.yaml","line":6,"column":14,"kind":"runner-label","snippet":" runs-on: linux-latest\n ^~~~~~~~~~~~","end_column":25}
{"message":"label \"linux-latest\" is unknown. available labels are \"windows-latest\", \"windows-2022\", \"windows-2019\", \"windows-2016\", \"ubuntu-latest\", \"ubuntu-22.04\", \"ubuntu-20.04\", \"macos-latest\", \"macos-latest-xl\", \"macos-latest-xlarge\", \"macos-latest-large\", \"macos-14-xl\", \"macos-14-xlarge\", \"macos-14-large\", \"macos-14\", \"macos-14.0\", \"macos-13-xl\", \"macos-13-xlarge\", \"macos-13-large\", \"macos-13\", \"macos-13.0\", \"macos-12-xl\", \"macos-12-xlarge\", \"macos-12-large\", \"macos-12\", \"macos-12.0\", \"macos-11\", \"macos-11.0\", \"macos-10.15\", \"self-hosted\", \"x64\", \"arm\", \"arm64\", \"linux\", \"macos\", \"windows\". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file","filepath":"testdata/format/test.yaml","line":6,"column":14,"kind":"runner-label","snippet":" runs-on: linux-latest\n ^~~~~~~~~~~~","end_column":25}
2 changes: 1 addition & 1 deletion testdata/format/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ unexpected key "branch" for "push" section. expected one of "branches", "branche

### Error at line 6, col 14 of `testdata/format/test.yaml`

label "linux-latest" is unknown. available labels are "windows-latest", "windows-2022", "windows-2019", "windows-2016", "ubuntu-latest", "ubuntu-22.04", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "macos-13.0", "macos-12-xl", "macos-12-xlarge", "macos-12-large", "macos-12", "macos-12.0", "macos-11", "macos-11.0", "macos-10.15", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
label "linux-latest" is unknown. available labels are "windows-latest", "windows-2022", "windows-2019", "windows-2016", "ubuntu-latest", "ubuntu-22.04", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-14.0", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "macos-13.0", "macos-12-xl", "macos-12-xlarge", "macos-12-large", "macos-12", "macos-12.0", "macos-11", "macos-11.0", "macos-10.15", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

```
runs-on: linux-latest
Expand Down
2 changes: 1 addition & 1 deletion testdata/format/test.sarif
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
{
"ruleId": "runner-label",
"message": {
"text": "label \"linux-latest\" is unknown. available labels are \"windows-latest\", \"windows-2022\", \"windows-2019\", \"windows-2016\", \"ubuntu-latest\", \"ubuntu-22.04\", \"ubuntu-20.04\", \"macos-latest\", \"macos-latest-xl\", \"macos-latest-xlarge\", \"macos-latest-large\", \"macos-13-xl\", \"macos-13-xlarge\", \"macos-13-large\", \"macos-13\", \"macos-13.0\", \"macos-12-xl\", \"macos-12-xlarge\", \"macos-12-large\", \"macos-12\", \"macos-12.0\", \"macos-11\", \"macos-11.0\", \"macos-10.15\", \"self-hosted\", \"x64\", \"arm\", \"arm64\", \"linux\", \"macos\", \"windows\". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file"
"text": "label \"linux-latest\" is unknown. available labels are \"windows-latest\", \"windows-2022\", \"windows-2019\", \"windows-2016\", \"ubuntu-latest\", \"ubuntu-22.04\", \"ubuntu-20.04\", \"macos-latest\", \"macos-latest-xl\", \"macos-latest-xlarge\", \"macos-latest-large\", \"macos-14-xl\", \"macos-14-xlarge\", \"macos-14-large\", \"macos-14\", \"macos-14.0\", \"macos-13-xl\", \"macos-13-xlarge\", \"macos-13-large\", \"macos-13\", \"macos-13.0\", \"macos-12-xl\", \"macos-12-xlarge\", \"macos-12-large\", \"macos-12\", \"macos-12.0\", \"macos-11\", \"macos-11.0\", \"macos-10.15\", \"self-hosted\", \"x64\", \"arm\", \"arm64\", \"linux\", \"macos\", \"windows\". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file"
},
"locations": [
{
Expand Down

0 comments on commit d99abec

Please sign in to comment.