Skip to content

OV9.1 Validation

OV9.1 Validation #616

Workflow file for this run

name: Run Tests
on:
pull_request:
branches:
- master
jobs:
test:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
# if we don't do this, `gofmt` will want to rewrite all Go files due to bad line endings,
# because Git will convert all line endings to CRLF when cloning on windows
- name: Set Git to use Linux-style line endings
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Checkout code
uses: actions/checkout@v2
- name: Format
run: if ! [ -z "$(find . -type f -name "*.go" -not -path "./vendor/*" | sed "s|^\./||" | xargs gofmt -l)" ]; then
echo -e " $(find . -type f -name "*.go" -not -path "./vendor/*" | sed "s|^\./||" | xargs gofmt -l)";
exit 1;
fi
if: matrix.platform == 'ubuntu-latest'
- name: Vet
run: go vet $(go list ./... | grep -v '/vendor/')