-
Notifications
You must be signed in to change notification settings - Fork 9
32 lines (31 loc) · 1.04 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
container: quay.io/centos/centos:stream9
steps:
- uses: actions/checkout@v4
- name: build
run: |
set -xeuo pipefail
dnf -y install 'dnf-command(config-manager)'
dnf -y config-manager --set-enabled crb
dnf -y install go-toolset libvirt-devel
# Because all the git clones are much less reliable
export GOPROXY=https://proxy.golang.org
go install github.com/onsi/ginkgo/v2/ginkgo@latest
make GOOPTS=-buildvcs=false
export PATH=$PATH:$HOME/go/bin
make integration_tests
- name: lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.58.2
export PATH=$PATH:$HOME/go/bin
make lint
- name: gofmt
run: |
if [ $(test -z $(gofmt -l .)) ]; then exit 0; else gofmt -d -e . && exit 1; fi