2020-06-23 22:15:31 -04:00
|
|
|
---
|
|
|
|
name: pull_request
|
|
|
|
"on": [pull_request]
|
|
|
|
jobs:
|
2020-06-23 23:53:21 -04:00
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
continue-on-error: true
|
|
|
|
steps:
|
|
|
|
- name: Set up Go 1.14
|
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
|
|
|
go-version: 1.14
|
|
|
|
id: go
|
2020-06-23 22:15:31 -04:00
|
|
|
|
2020-06-23 23:53:21 -04:00
|
|
|
- name: Check out code
|
|
|
|
uses: actions/checkout@v1
|
2020-06-23 22:15:31 -04:00
|
|
|
|
2020-06-23 23:53:21 -04:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2020-09-09 00:34:21 -04:00
|
|
|
sudo apt-get install -y xvfb libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libgl1-mesa-dev libsdl2-dev libasound2-dev > /dev/null 2>&1
|
2020-06-23 22:15:31 -04:00
|
|
|
|
2020-06-23 23:53:21 -04:00
|
|
|
- name: Run golangci-lint
|
2020-10-26 19:16:59 -04:00
|
|
|
continue-on-error: false
|
2020-06-23 23:53:21 -04:00
|
|
|
uses: golangci/golangci-lint-action@v1.2.1
|
|
|
|
with:
|
|
|
|
version: v1.27
|
2020-06-23 22:15:31 -04:00
|
|
|
|
2020-06-23 23:53:21 -04:00
|
|
|
- name: Run tests
|
2020-09-09 00:34:21 -04:00
|
|
|
env:
|
|
|
|
DISPLAY: ":99.0"
|
|
|
|
run: |
|
|
|
|
xvfb-run --auto-servernum go test -v -race ./...
|
2020-06-23 22:15:31 -04:00
|
|
|
|
2020-06-23 23:53:21 -04:00
|
|
|
- name: Build binary
|
|
|
|
run: go build .
|