build: add make target to build it in a container (#23) #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
push: | |
jobs: | |
mod: | |
name: "run go mod tidy" | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- uses: hashicorp/setup-golang@36878950ae8f21c1bc25accaf67a4df88c29b01d # v3.0.0 | |
- uses: ./.github/actions/install-libvirt-dev | |
- name: "run go mod tidy" | |
run: | | |
make check-go-mod | |
lint: | |
name: "run Go lint" | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- uses: hashicorp/setup-golang@36878950ae8f21c1bc25accaf67a4df88c29b01d # v3.0.0 | |
- uses: ./.github/actions/install-libvirt-dev | |
- name: "run lint" | |
run: | | |
make lint-tools | |
make lint | |
test: | |
name: "run Go tests" | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- uses: hashicorp/setup-golang@36878950ae8f21c1bc25accaf67a4df88c29b01d # v3.0.0 | |
- uses: ./.github/actions/install-libvirt-dev | |
- name: "run tests" | |
run: | | |
make test-tools | |
sudo sed -i 's!Defaults!#Defaults!g' /etc/sudoers | |
sudo -E env "PATH=$PATH" make test |