-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace Travis CI with Github Actions (#64)
* Add basic Github Actions workflow file * Give the build job a name which includes the go version * Checkout submodules in the Github workflow * Flip around gofmt and go test in the Github workflow so the most important errors are shown first * Replace Github workflow Go version 1.21 with stable * Replace the Travis CI badge with a Github Actions badge in the README * Remove Travis CI file * Add goveralls to the Github workflow * Only install goveralls when building with Go stable in the Github workflow * Try to fix goveralls in Github workflow * Try to fix goveralls in Github workflow * Update Coveralls badge * Only run coverage on the master branch in the Github workflow * Use the Go version in the go.mod file instead of using a matrix * Revert "Use the Go version in the go.mod file instead of using a matrix" This reverts commit 12bbfc4.
- Loading branch information
1 parent
631333a
commit c7a067b
Showing
3 changed files
with
49 additions
and
28 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,47 @@ | ||
# This workflow will build a golang project | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | ||
|
||
name: Go | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go-version: ['1.14', 'stable'] | ||
name: Build with Go ${{ matrix.go-version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Install goveralls | ||
if: ${{ matrix.go-version == 'stable' && github.ref == 'refs/heads/master' }} | ||
run: go install github.com/mattn/goveralls@latest | ||
|
||
- name: Build | ||
run: go build -v ./... | ||
|
||
- name: Test | ||
run: go test -v -covermode atomic -coverprofile=covprofile ./... | ||
|
||
- name: Gofmt | ||
run: gofmt -d ./ | ||
|
||
- name: Send coverage | ||
if: ${{ matrix.go-version == 'stable' && github.ref == 'refs/heads/master' }} | ||
env: | ||
COVERALLS_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
run: goveralls -coverprofile=covprofile -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