ppforge/.github/workflows/go.yml

44 lines
1.2 KiB
YAML
Raw Permalink Normal View History

name: Go
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
2023-05-12 16:09:33 +02:00
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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 ./...
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: setup runner
run: |
# sudo apt search xorg
export DEBIAN_FRONTEND=noninteractive
2023-04-12 11:10:51 +02:00
apt-get update
2023-04-12 11:17:46 +02:00
apt-get install -y xserver-xorg libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libglvnd-dev libxxf86vm-dev
- name: Set up Go
2023-04-12 11:09:43 +02:00
uses: https://github.com/actions/setup-go@v2
with:
2023-04-12 15:14:19 +02:00
go-version: 1.20
- name: Install GoReleaser
2023-04-12 11:02:56 +02:00
uses: https://github.com/goreleaser/goreleaser-action@v2.7.0
with:
install-only: true
- name: Test
2023-05-12 16:04:20 +02:00
run: go test -v -cover ./...
- name: Build
run: goreleaser build --snapshot --rm-dist