Skip to content

ECOPROJECT-4328 | fix: require VI SDK UUID and fix inventory snapshot… #4089

ECOPROJECT-4328 | fix: require VI SDK UUID and fix inventory snapshot…

ECOPROJECT-4328 | fix: require VI SDK UUID and fix inventory snapshot… #4089

Workflow file for this run

---
name: Go
on: # yamllint disable-line rule:truthy
push:
branches: [main]
pull_request:
branches: [main, 'release-*']
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
# Node required for setup-go post (cache save); needed when running with act
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Setup libvirt
run: |
sudo apt update
sudo apt install -y libvirt-dev
- name: Run golangci-lint
run: make lint
check-generate:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Check generated files are up to date
run: |
make check-generate
# The Makefile only checks for uncommitted changes, allowing users to keep untracked files in the repository.
# Here, we also check for untracked files, as none are expected at this stage.
if [[ $(git ls-files --others --exclude-standard) ]]; then git ls-files --others --exclude-standard; echo "These files are not tracked by git"; exit 1; fi
check-format:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Check that formatting does not introduce changes
run: make check-format
unit-test:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Setup libvirt
run: |
sudo apt update
sudo apt install -y libvirt-dev
- name: Setup Podman
run: |
sudo apt update
sudo apt install -y podman podman-compose
- name: Run the tests
run: make unit-test