ppforge/.github/workflows/go.yml

41 lines
1.1 KiB
YAML

name: Go
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: setup runner
run: |
# sudo apt search xorg
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y xserver-xorg libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libglvnd-dev libxxf86vm-dev
- name: Set up Go
uses: https://github.com/actions/setup-go@v2
with:
go-version: 1.19
- name: Install GoReleaser
uses: https://github.com/goreleaser/goreleaser-action@v2.7.0
with:
install-only: true
- name: Go-linter
# You may pin to the exact commit or the version.
# uses: Jerome1337/golint-action@c5d17206a0a436bbf1edb91e314ed084f7c57589
uses: https://github.com/Jerome1337/golint-action@v1.0.2
#with:
# Path used by golint command
# golint-path: # optional, default is ./...
- name: Build
run: goreleaser build --snapshot --rm-dist
- name: Test
run: go test -v -cover