Skip to content

Merge pull request #4 from mariow/sweep/add-sweep-config #22

Merge pull request #4 from mariow/sweep/add-sweep-config

Merge pull request #4 from mariow/sweep/add-sweep-config #22

Workflow file for this run

name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
platform_tests:
runs-on: ${{matrix.os }}
strategy:
fail-fast: false
matrix:
go-version: [1.17.x]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: WillAbides/setup-go-faster@v1.5.0
id: setup-go-faster
with:
go-version: ${{ matrix.go-version }}
- uses: actions/cache@v2
with:
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
%LocalAppData%\go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Get dependencies
run: sudo apt-get update && sudo apt-get install gcc libgl1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev libx11-dev xorg-dev
if: ${{ runner.os == 'Linux' }}
- name: Tests
run: go test -tags ci ./...
- name: Update coverage
run: |
GO111MODULE=off go get github.com/mattn/goveralls
set -e
go test -tags ci -covermode=atomic -coverprofile=coverage.out ./...
if [ $coverage -lt 69 ]; then echo "Test coverage lowered"; exit 1; fi
if: ${{ runner.os == 'Linux' }}
- name: Update PR Coverage
uses: shogo82148/actions-goveralls@v1
env:
GOROOT: ${{steps.setup-go-faster.outputs.GOROOT}}
with:
path-to-profile: coverage.out
if: ${{ runner.os == 'Linux' && github.event_name == 'push' }}