2021-10-12 19:56:36 +02:00
|
|
|
name: Go
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
build:
|
2022-08-14 22:55:57 +02:00
|
|
|
runs-on: ubuntu-latest
|
2021-10-12 19:56:36 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-08-14 22:55:57 +02:00
|
|
|
- name: setup runner
|
|
|
|
run: |
|
2022-08-14 22:59:01 +02:00
|
|
|
# sudo apt search xorg
|
2022-08-14 23:02:54 +02:00
|
|
|
sudo apt-get install -y xserver-xorg libxcursor-dev
|
2021-10-12 19:56:36 +02:00
|
|
|
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
2022-08-14 21:45:19 +02:00
|
|
|
go-version: 1.19
|
2021-11-01 21:19:21 +01:00
|
|
|
- name: Install GoReleaser
|
|
|
|
uses: goreleaser/goreleaser-action@v2.7.0
|
|
|
|
with:
|
|
|
|
install-only: true
|
2021-10-12 19:56:36 +02:00
|
|
|
- name: Go-linter
|
|
|
|
# You may pin to the exact commit or the version.
|
|
|
|
# uses: Jerome1337/golint-action@c5d17206a0a436bbf1edb91e314ed084f7c57589
|
|
|
|
uses: Jerome1337/golint-action@v1.0.2
|
|
|
|
#with:
|
|
|
|
# Path used by golint command
|
|
|
|
# golint-path: # optional, default is ./...
|
|
|
|
- name: Build
|
2021-11-01 21:19:21 +01:00
|
|
|
run: goreleaser build --snapshot --rm-dist
|
2021-10-12 19:56:36 +02:00
|
|
|
- name: Test
|
2022-01-30 00:20:35 +01:00
|
|
|
run: go test -v -cover
|
2021-11-01 21:35:44 +01:00
|
|
|
|