forked from Kong/go-kong
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (76 loc) · 2.56 KB
/
integration-test-enterprise.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
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
name: 'Integration Test : Enterprise'
on:
push:
branches:
- 'main'
- 'release/*'
pull_request:
branches:
- '*'
jobs:
test-enterprise:
continue-on-error: true
strategy:
matrix:
kong_version:
- 'enterprise-2.1.4.6'
- 'enterprise-2.2.1.3'
- 'enterprise-2.3.3.4'
- 'enterprise-2.4.1.3'
- 'enterprise-2.5.1.2'
- 'enterprise-2.6.0.2'
- 'enterprise-2.7.0.0'
- 'enterprise-2.8.0.0'
- 'enterprise-3.0.0.0'
env:
KONG_VERSION: ${{ matrix.kong_version }}
KONG_ENTERPRISE_REPO_USERNAME: ${{ secrets.KONG_ENTERPRISE_REPO_USERNAME }}
KONG_ENTERPRISE_REPO_PASSSWORD: ${{ secrets.KONG_ENTERPRISE_REPO_PASSSWORD }}
KONG_ANONYMOUS_REPORTS: "off"
KONG_ADMIN_TOKEN: kong
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11.6-alpine
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
# This will set KONG_LINCENSE_DATA environment variable.
# NOTE:
# This could be (?) made a shared step but for some reason it's impossible
# to override:
# Warning: Skip output 'license' since it may contain secret.
# on Github Actions when setting a job output.
- uses: Kong/kong-license@9fb64ad7be1ed2b121a70990783d7c0869e531d5
id: license_step
with:
password: ${{ secrets.PULP_PASSWORD }}
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: '^1.16'
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions/[email protected]
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup Postgres
run: |
psql -c 'create database kong;' -U postgres -h 127.0.0.1 -p 5432
psql -c 'create user kong;' -U postgres -h 127.0.0.1 -p 5432
psql -c 'GRANT ALL PRIVILEGES ON DATABASE "kong" to kong;' -U postgres -h 127.0.0.1 -p 5432
- name: Setup Kong
run: make setup-kong
- name: Run tests
run: make test-coverage-enterprise
- name: Upload Code Coverage
uses: codecov/[email protected]
with:
name: codecov-${{ matrix.kong_version }}
flags: ${{ matrix.kong_version }},integration,enterprise
fail_ci_if_error: true