2020-06-23 22:15:31 -04:00
|
|
|
name: pull_request
|
2020-12-29 15:29:15 -05:00
|
|
|
"on": [pull_request]
|
2020-06-23 22:15:31 -04:00
|
|
|
jobs:
|
2020-06-23 23:53:21 -04:00
|
|
|
build:
|
2020-12-29 15:24:17 -05:00
|
|
|
name: ''
|
2020-12-29 11:05:52 -05:00
|
|
|
runs-on: self-hosted
|
2020-06-23 23:53:21 -04:00
|
|
|
continue-on-error: true
|
|
|
|
steps:
|
|
|
|
- name: Set up Go 1.14
|
2020-12-07 14:36:03 -05:00
|
|
|
uses: actions/setup-go@v2.1.3
|
2020-06-23 23:53:21 -04:00
|
|
|
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
|
2020-12-07 14:36:03 -05:00
|
|
|
uses: actions/checkout@v2.3.4
|
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-11-17 03:30:04 -05:00
|
|
|
uses: golangci/golangci-lint-action@v2.3.0
|
2020-06-23 23:53:21 -04:00
|
|
|
with:
|
2020-11-13 13:59:38 -05:00
|
|
|
version: v1.32
|
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 .
|