Skip to content

release: 1.7.40

release: 1.7.40 #591

Workflow file for this run

name: Check
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
pull-requests: read
checks: write
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 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