diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 70189cb..c8d92d5 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -6,18 +6,34 @@ on: branches: [master] jobs: - unit-tests: - name: Unit Tests + lint: + name: Lint runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version-file: go.mod - - run: go build ./... + - name: Install staticcheck + run: go install honnef.co/go/tools/cmd/staticcheck@latest - run: go vet ./... + - run: staticcheck ./... + + unit-tests: + name: Unit Tests (Go ${{ matrix.go-version }}) + runs-on: ubuntu-latest + strategy: + matrix: + go-version: ['1.25', '1.26'] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} + - run: go build ./... - run: go test -race -coverprofile=coverage-unit.out ./... - uses: actions/upload-artifact@v4 + if: matrix.go-version == '1.26' with: name: coverage-unit path: coverage-unit.out @@ -174,7 +190,7 @@ jobs: codecov: name: Upload Coverage runs-on: ubuntu-latest - needs: [unit-tests, debian, ubuntu, fedora-dnf4, fedora-dnf5, alpine, arch, flatpak] + needs: [lint, unit-tests, debian, ubuntu, fedora-dnf4, fedora-dnf5, alpine, arch, flatpak] if: always() steps: - uses: actions/checkout@v4