Run expensive build steps on large runners #1199
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
name: Go Build and Test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: | |
group: "Default Large Runners" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install libpcap | |
run: sudo apt-get install libpcap-dev | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.19 | |
- name: Granting private modules access | |
run: | | |
git config --global url."https://${{ secrets.GH_TOKEN }}:[email protected]/".insteadOf "https://github.com/" | |
- name: Run Unit tests | |
run: | | |
go test -failfast -coverprofile=profile.cov ./... | |
- name: Install goveralls | |
env: | |
GO111MODULE: off | |
run: go get github.com/mattn/goveralls | |
- name: Send coverage | |
env: | |
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: goveralls -coverprofile=profile.cov -service=github |