-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh-actions: Add 'make check' github action
This runs 'make check' on the 2 latest releases of Windows/macOS/ubuntu Windows is tested in a separate workflow because we need to disable the gofmt/goimports linters. They cause CI failures as they replace end of lines with CRLF, and then golangci-lint fails because it thinks some source files are not properly formatted.
- Loading branch information
Showing
2 changed files
with
59 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Run 'make check' on Windows | ||
on: | ||
push: | ||
branches: | ||
- "main" | ||
- "old-main" | ||
pull_request: {} | ||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- windows-2019 | ||
- windows-2022 | ||
go: | ||
- 1.16 | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v2 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- name: Disable gofmt/goimports linters on Windows | ||
run: sed -i "/gofmt/d" .golangci.yml && sed -i "/goimports/d" .golangci.yml | ||
shell: bash | ||
- name: make check | ||
run: make check |
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,29 @@ | ||
name: Run 'make check' | ||
on: | ||
push: | ||
branches: | ||
- "main" | ||
- "old-main" | ||
pull_request: {} | ||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- macOS-10.15 | ||
- macOS-11 | ||
- ubuntu-latest | ||
- ubuntu-18.04 | ||
go: | ||
- 1.16 | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v2 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- name: Build | ||
run: make check |