-
Notifications
You must be signed in to change notification settings - Fork 1.1k
97 lines (82 loc) · 2.63 KB
/
release-tests.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
# yamllint disable rule:line-length
---
name: Run CI tests and smoke tests
on: # yamllint disable-line rule:truthy
workflow_call:
jobs:
opentelemetry-e2e:
name: Opentelemetry e2e
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Task
uses: arduino/setup-task@v1
with:
version: 3
- id: ecr-login
uses: ./.github/actions/ecr-login
- name: Run e2e opentelemetry tests
env:
GATEWAY_IMAGE: ${{ steps.ecr-login.outputs.registry }}/tyk:sha-${{ github.sha }}
run: task opentelemetry
ci-tests:
name: CI Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- id: ecr-login
uses: ./.github/actions/ecr-login
- name: Run /ci/tests
shell: bash
env:
GITHUB_TAG: ${{ github.ref }}
GATEWAY_IMAGE: ${{ steps.ecr-login.outputs.registry }}/tyk:sha-${{ github.sha }}
PLUGIN_COMPILER_IMAGE: ${{ steps.ecr-login.outputs.registry }}/tyk-plugin-compiler:sha-${{ github.sha }}
run: |
set -eaxo pipefail
for d in ci/tests/*/
do
echo Attempting to test $d
if [ -d $d ] && [ -e $d/test.sh ]; then
cd $d
./test.sh
cd -
fi
done
smoke-tests:
name: Smoke tests
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- id: ecr-login
uses: ./.github/actions/ecr-login
- name: Run /ci/smoke-tests
# This job only runs whenever a tag is created. A tag is required
# for a functional plugin compiler build for when the GO_GET=1 env
# is provided. The plugin compiler cannot fetch the referenced
# commit from a PR, but requires a /heads or /tags reference.
#
# See https://github.com/golang/go/issues/31191 for more info.
shell: bash
env:
GITHUB_TAG: ${{ github.ref }}
GATEWAY_IMAGE: ${{ steps.ecr-login.outputs.registry }}/tyk:sha-${{ github.sha }}
PLUGIN_COMPILER_IMAGE: ${{ steps.ecr-login.outputs.registry }}/tyk-plugin-compiler:sha-${{ github.sha }}
run: |
set -eaxo pipefail
for d in ci/smoke-tests/*/
do
echo Attempting to test $d
if [ -d $d ] && [ -e $d/test.sh ]; then
cd $d
./test.sh
cd -
fi
done