-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: switch to GitHub Actions and bump Go to 1.15
Let's join the 21st century. Signed-off-by: Dan Williams <dcbw@redhat.com>
- Loading branch information
Showing
3 changed files
with
61 additions
and
50 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,59 @@ | ||
--- | ||
name: test | ||
|
||
on: ["push", "pull_request"] | ||
|
||
env: | ||
GO_VERSION: "1.15" | ||
LINUX_ARCHES: "amd64 386 arm arm64 s390x mips64le ppc64le" | ||
|
||
jobs: | ||
build: | ||
name: Build all linux architectures | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: setup go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Build on all supported architectures | ||
run: | | ||
set -e | ||
for arch in ${LINUX_ARCHES}; do | ||
echo "Building for arch $arch" | ||
GOARCH=$arch make | ||
rm bin/* | ||
done | ||
test-linux: | ||
name: Run tests on Linux amd64 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: setup go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install test binaries | ||
env: | ||
GO111MODULE: off | ||
run: | | ||
go get golang.org/x/tools/cmd/cover | ||
go get github.com/modocache/gover | ||
go get github.com/mattn/goveralls | ||
go get -t ./... | ||
- name: test | ||
run: PATH=$PATH:$(go env GOPATH)/bin COVERALLS=1 ./test_linux.sh | ||
|
||
- name: Send coverage to coveralls | ||
env: | ||
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
PATH=$PATH:$(go env GOPATH)/bin | ||
gover | ||
goveralls -coverprofile=gover.coverprofile -service=github | ||
This file was deleted.
Oops, something went wrong.
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