-
Notifications
You must be signed in to change notification settings - Fork 24
42 lines (36 loc) · 1.14 KB
/
pull-request.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: PR Check
on: [pull_request]
# When a new revision is pushed to a PR, cancel all in-progress CI runs for that
# PR. See https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
e2e:
name: E2E
runs-on: ubuntu-latest
steps:
- uses: open-policy-agent/setup-opa@v2
- uses: ko-build/[email protected]
- uses: turtlequeue/[email protected]
with:
babashka-version: 1.3.181
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
check-latest: true
- name: Build image
id: app
run: echo "image=$(ko build --local ./cmd/example-api-authz-go)" >> $GITHUB_OUTPUT
- name: Run API tests
working-directory: e2e
run: bb run tests
env:
IMAGE: ${{ steps.app.outputs.image }}
- name: Dump logs
run: docker compose logs
working-directory: e2e
if: ${{ failure() }}
env:
IMAGE: ${{ steps.app.outputs.image }}