-
Notifications
You must be signed in to change notification settings - Fork 1.1k
83 lines (72 loc) · 2.16 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
# yamllint disable rule:line-length
---
name: Run CI tests and smoke tests
on: # yamllint disable-line rule:truthy
workflow_run:
workflows: [ "Release" ]
types:
- completed
push:
tags:
- 'v*'
jobs:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
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: tykio/tyk-gateway:${{ GITHUB_TAG }}
PLUGIN_COMPILER_IMAGE: tykio/tyk-plugin-compiler:${{ GITHUB_TAG }}
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: tykio/tyk-gateway:${{ GITHUB_TAG }}
PLUGIN_COMPILER_IMAGE: tykio/tyk-plugin-compiler:${{ GITHUB_TAG }}
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