forked from Kong/go-kong
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (65 loc) · 1.93 KB
/
integration-test.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
name: 'Integration Test : Community'
on:
push:
branches:
- 'main'
- 'release/*'
pull_request:
branches:
- '*'
jobs:
test:
strategy:
matrix:
kong_version:
- '2.0.5'
- '2.1.4'
- '2.2.2'
- '2.3.3'
- '2.4.0'
- '2.5.1'
- '2.6.0'
- '2.7.0'
- '2.8.0'
- '3.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"
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:
- 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
- name: Upload Code Coverage
uses: codecov/[email protected]
with:
name: codecov-${{ matrix.kong_version }}
flags: ${{ matrix.kong_version }},integration,community
fail_ci_if_error: true