Skip to content

Commit

Permalink
gh-actions: Add 'make check' github action
Browse files Browse the repository at this point in the history
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
cfergeau authored and anjannath committed Apr 21, 2022
1 parent 8414996 commit 6ee1d0b
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/make-check-win.yml
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
29 changes: 29 additions & 0 deletions .github/workflows/make-check.yml
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

0 comments on commit 6ee1d0b

Please sign in to comment.