Skip to content

Deprecated ioutil.ReadAll() replaced to io.ReadAll() #390

Deprecated ioutil.ReadAll() replaced to io.ReadAll()

Deprecated ioutil.ReadAll() replaced to io.ReadAll() #390

Workflow file for this run

name: Platform Tests
on: [push, pull_request]
jobs:
platform_tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
go-version: [1.14, 1.17]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: WillAbides/[email protected]
id: setup-go-faster
with:
go-version: ${{ matrix.go-version }}
- 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 bc
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 ./...
coverage=`go tool cover -func coverage.out | grep total | tr -s '\t' | cut -f 3 | grep -o '[^%]*'`
if (( $(echo "$coverage < 48" | bc) )) ; 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' && matrix.go-version == '1.17' && github.event_name == 'push' }}