Skip to content

Merge pull request #125 from Icinga/ingress-no-host #331

Merge pull request #125 from Icinga/ingress-no-host

Merge pull request #125 from Icinga/ingress-no-host #331

Workflow file for this run

name: Go
on:
push:
branches:
- main
pull_request: { }
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- name: Build
run: go build -gcflags="-m" ./...
- name: Test
run: go test -v -race ./...
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- uses: golangci/golangci-lint-action@v6
with:
version: latest
only-new-issues: true
args: -E gosec --timeout=2m --verbose
modtidy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- name: Run go mod tidy
run: |
go mod tidy
gitdiff="$(git diff -U0)"
echo "$gitdiff"
test -z "$gitdiff"
vendor-diff:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: stable
- name: Checkout base commit
uses: actions/checkout@v4
with:
path: a
ref: ${{ github.base_ref }}
- name: Download dependencies of base commit
run: go mod vendor
working-directory: a
- name: Checkout PR
uses: actions/checkout@v4
with:
path: b
- name: Download dependencies of PR
run: go mod vendor
working-directory: b
- name: Diff of dependencies
run: diff -ur --color=always a/vendor b/vendor || true