-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (37 loc) · 1.11 KB
/
integration-test.yml
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
43
44
45
46
47
48
name: Integration test
on:
pull_request:
branches:
- main
jobs:
integration_test:
name: Integration test
strategy:
matrix:
go-version: [1.19.3]
platform: [ubuntu-20.04]
runs-on: ${{ matrix.platform }}
steps:
- name: Set up Go
uses: actions/[email protected]
with:
go-version: ${{ matrix.go-version }}
cache: false
- name: Checkout current branch
uses: actions/[email protected]
with:
fetch-depth: '0'
- name: Get testenv image tag
run : |
export TEST_IMAGE="$(make get-envtest-image-tag -s)"
echo "TEST_IMAGE=${TEST_IMAGE}" >> ${GITHUB_ENV}
- name: Log in to the Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
# Build a new testenv image to use if and only if the Dockerfile or Makefile is changed in this PR
- name: Build image
run : ./scripts/build-image-conditionally.sh
- name: Run integration tests
run : ./scripts/integration-test.sh