release: 1.7.57 #802
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: Check | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: | |
contents: read | |
pull-requests: read | |
checks: write | |
jobs: | |
check: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Setup Go | |
uses: ./.github/actions/setup-go | |
- name: Install dependencies | |
run: go get | |
- name: Format | |
continue-on-error: true | |
run: files=$(gofmt -l .) && echo $files && [ -z "$files" ] | |
- name: Build | |
run: go build -v | |
- name: Test | |
run: go test -v -cover | |
- name: Lint | |
uses: ./.github/actions/golangci-lint | |
- name: Setup ko | |
uses: ./.github/actions/setup-ko | |
- name: Build container | |
run: | | |
IMAGE="$(ko build --local --base-import-paths | tee | tail -1)" | |
echo "IMAGE=${IMAGE}" >> $GITHUB_ENV | |
env: | |
KO_DEFAULTPLATFORMS: linux/amd64,linux/arm64 | |
- name: Start container | |
run: docker run -d -p 8080:8080 -p 8081:8081 ${{ env.IMAGE }} | |
- name: Post example reports | |
run: | | |
for report in examples/*.json; do | |
echo Post report ${report} | |
cat "${report}" | gzip | curl --no-progress-meter --fail-with-body --data-binary @- localhost:8080/report | |
done | |
- name: Fetch policy | |
run: curl --no-progress-meter --fail-with-body localhost:8080/.well-known/mta-sts.txt | |
- name: Fetch metrics | |
run: curl --no-progress-meter --fail-with-body localhost:8081/metrics |