-
Notifications
You must be signed in to change notification settings - Fork 35
104 lines (96 loc) · 2.7 KB
/
main.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Build Hub
on:
pull_request:
paths-ignore:
- '**.md'
push:
paths-ignore:
- '**.md'
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.19'
- run: make fmt
vet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.19'
- run: make vet
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.19'
- run: make cmd
build-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: make podman-build
test-unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.19'
- run: make test
test-api:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.19'
- run: |
make vet
DISCONNECTED=1 make run &
sleep 15 # probably a dirty solution
DISCONNECTED=1 HUB_BASE_URL=http://localhost:8080 make test-api
DISCONNECTED=1 HUB_BASE_URL=http://localhost:8080 make test-api # Intentionaly run 2x to catch data left in Hub DB.
test-e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: start-minikube
uses: konveyor/tackle2-operator/.github/actions/start-minikube@main
- name: Build image in minikube
run: |
export SHELL=/bin/bash
eval $(minikube -p minikube docker-env)
make docker-build
- name: install-tackle
uses: konveyor/tackle2-operator/.github/actions/install-tackle@main
with:
operator-bundle-image: quay.io/konveyor/tackle2-operator-bundle:v0.5.3
tackle-hub-image: tackle2-hub:latest
tackle-image-pull-policy: IfNotPresent
- name: save image
run: |
IMG=quay.io/konveyor/tackle2-hub:latest make docker-build
docker save -o /tmp/tackle2-hub.tar quay.io/konveyor/tackle2-hub:latest
- name: Upload image as artifact
uses: actions/upload-artifact@v3
with:
name: tackle2-hub
path: /tmp/tackle2-hub.tar
retention-days: 1
test-integration:
needs: test-e2e
uses: konveyor/ci/.github/workflows/global-ci.yml@main
with:
tag: release-0.5
operator_tag: v0.5.3
api_tests_ref: release-0.5
run_ui_tests: false
component_name: tackle2-hub
api_hub_tests_ref: ${{ github.ref }}