-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev: fix CI workflow for Windows (#3134)
- Loading branch information
Showing
25 changed files
with
279 additions
and
76 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,3 @@ | ||
go.sum linguist-generated | ||
* text=auto eol=lf | ||
*.ps1 text eol=crlf |
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 |
---|---|---|
|
@@ -9,7 +9,7 @@ env: | |
GO_VERSION: 1.19 | ||
|
||
jobs: | ||
# Check if there any dirty change for go mod tidy | ||
# Check if there is any dirty change for go mod tidy | ||
go-mod: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -41,8 +41,7 @@ jobs: | |
# ex: | ||
# - 1.18beta1 -> 1.18.0-beta.1 | ||
# - 1.18rc1 -> 1.18.0-rc.1 | ||
# go-version: ${{ env.GO_VERSION }} # todo(ldez) uncomment after the next release v1.48.0 | ||
go-version: 1.18 | ||
go-version: ${{ env.GO_VERSION }} | ||
- name: lint | ||
uses: golangci/[email protected] | ||
with: | ||
|
@@ -66,7 +65,6 @@ jobs: | |
go-version: ${{ env.GO_VERSION }} # test only the latest go version to speed up CI | ||
- name: Run tests | ||
run: make.exe test | ||
continue-on-error: true | ||
|
||
tests-on-macos: | ||
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors | ||
|
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
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
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
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
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,8 @@ | ||
//go:build !windows | ||
|
||
package processors | ||
|
||
// normalizePathInRegex it's a noop function on Unix. | ||
func normalizePathInRegex(path string) string { | ||
return path | ||
} |
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,19 @@ | ||
//go:build windows | ||
|
||
package processors | ||
|
||
import ( | ||
"path/filepath" | ||
"regexp" | ||
"strings" | ||
) | ||
|
||
var separatorToReplace = regexp.QuoteMeta(string(filepath.Separator)) | ||
|
||
// normalizePathInRegex normalizes path in regular expressions. | ||
// noop on Unix. | ||
// This replacing should be safe because "/" are disallowed in Windows | ||
// https://docs.microsoft.com/windows/win32/fileio/naming-a-file | ||
func normalizePathInRegex(path string) string { | ||
return strings.ReplaceAll(path, "/", separatorToReplace) | ||
} |
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
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
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
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
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
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
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
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,3 +1,5 @@ | ||
//go:build !windows | ||
|
||
//golangcitest:args -Eifshort --internal-cmd-test | ||
package testdata | ||
|
||
|
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,5 +1,4 @@ | ||
//go:build go1.18 | ||
// +build go1.18 | ||
|
||
//golangcitest:args -Etenv | ||
package testdata | ||
|
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,5 +1,4 @@ | ||
//go:build go1.18 | ||
// +build go1.18 | ||
|
||
//golangcitest:args -Ethelper | ||
package testdata | ||
|
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
Oops, something went wrong.