-
Notifications
You must be signed in to change notification settings - Fork 35
90 lines (82 loc) · 1.76 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
name: Build Hub
on:
pull_request:
paths-ignore:
- '**.md'
push:
paths-ignore:
- '**.md'
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: '1.21'
- run: make fmt
vet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: '1.21'
- run: make vet
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: '1.21'
- run: make cmd
test-unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: '1.21'
- run: make test
test-api:
needs:
- fmt
- vet
- build
- test-unit
runs-on: ubuntu-latest
env:
DISCONNECTED: 1
HUB_BASE_URL: http://localhost:8080
DB_PATH: /tmp/hub.db
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: '1.21'
- run: |
rm -f $DB_PATH
make run &
sleep 15 # probably a dirty solution
make test-api
build-image:
needs:
- fmt
- vet
- build
- test-unit
- test-api
runs-on: ubuntu-latest
env:
IMG: ttl.sh/konveyor-hub-${{ github.sha }}:2h
steps:
- uses: actions/checkout@v4
- run: make docker-build
- run: docker push ${IMG}
test-integration:
needs: build-image
uses: konveyor/ci/.github/workflows/global-ci-bundle.yml@main
with:
tackle_hub: ttl.sh/konveyor-hub-${{ github.sha }}:2h
api_hub_tests_ref: ${{ github.ref }}