Skip to content

[skip-release] Pin libops/actions action to ef667db (#78) #305

[skip-release] Pin libops/actions action to ef667db (#78)

[skip-release] Pin libops/actions action to ef667db (#78) #305

Workflow file for this run

name: lint-test
on:
push:
jobs:
run:
permissions:
contents: read
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
with:
go-version: ">=1.25.0"
- name: golangci-lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9
with:
version: latest
- name: check YML
run: yq . .traefik.yml
- name: go mod tidy
run: |
go mod tidy
if ! git diff --exit-code go.mod go.sum; then
echo "Error: go.mod or go.sum is not tidy. Run 'go mod tidy' locally and commit the changes."
exit 1
fi
- name: go mod vendor
run: |
go mod vendor
if ! git diff --exit-code vendor/; then
echo "Error: vendor/ directory is not up-to-date. Run 'go mod vendor' locally and commit the changes."
exit 1
fi
- name: unit test
run: go test -v -skip 'TestStateOperationsWithinThreshold' -race ./...
- name: generate coverage
run: go test -skip 'TestStateOperationsWithinThreshold' -coverprofile=coverage.out -covermode=atomic $(go list ./... | grep -v '/ci') || echo continue
- name: upload coverage to codecov
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6
with:
files: ./coverage.out
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
integration-test-latest:
needs: [run]
permissions:
contents: read
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: run
run: go run test.go
working-directory: ./ci
env:
TRAEFIK_TAG: latest
- name: cleanup
if: ${{ always() }}
run: docker compose logs --tail 100 nginx nginx2 traefik && docker compose down
working-directory: ./ci
integration-test:
needs: [integration-test-latest]
permissions:
contents: read
runs-on: ubuntu-24.04
strategy:
matrix:
traefik: [v2.11, v3.0, v3.1, v3.2, v3.3, v3.4, v3.5, v3.6]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: run
run: go run test.go
working-directory: ./ci
env:
TRAEFIK_TAG: ${{ matrix.traefik }}
- name: cleanup
if: ${{ always() }}
run: docker compose logs --tail 100 nginx nginx2 traefik && docker compose down
working-directory: ./ci