-
Notifications
You must be signed in to change notification settings - Fork 2
98 lines (76 loc) · 2.56 KB
/
test-sdk-packages.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
98
name: Test Packaged Server SDKs
on:
workflow_dispatch:
push:
jobs:
test-packaged-server-sdks:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
sdk:
- { sdkName: "eppo/php-sdk",
sdkDir: "php-sdk-relay",
hostAddressFromDocker: "localhost"
}
runs-on: ubuntu-latest
env:
SDK_NAME: ${{matrix.sdk.sdkName}}
SDK_DIR: ${{ matrix.sdk.sdkDir }}
EPPO_API_HOST: ${{matrix.sdk.hostAddressFromDocker}}
SDK_RELAY_HOST: ${{matrix.sdk.hostAddressFromDocker}}
TEST_RUNNER_HOST: ${{matrix.sdk.hostAddressFromDocker}}
steps:
- name: Test information header
shell: bash
run: echo "Running Test Cluster for ${SDK_NAME}"
- name: Get current date
id: date
run: |
echo "::set-output name=date::$(date +'%Y-%m-%d')"
echo "SAFE_SDK_NAME=$(echo ${SDK_NAME} | sed 's/\//_/g')" >> $GITHUB_ENV
- uses: actions/checkout@v3
- name: Prepare test runner image
run: |
pushd package-testing/sdk-test-runner
docker build . -t Eppo-exp/sdk-test-runner:latest
echo "pull the latest instead"
popd
- name: Prepare testing API server image
run: |
pushd package-testing/testing-api
docker build . -t Eppo-exp/test-api-server:latest
echo "pull the latest instead"
popd
- name: Run tests
run: |
pushd package-testing/sdk-test-runner
./test-sdk.sh server ${SDK_NAME}
ls -al ./logs
popd
- name: Logs
if: success() || failure() # always run even if the previous steps fail
run: |
echo "List log files"
pushd package-testing/sdk-test-runner
ls logs
popd
- name: Upload Logs
if: success() || failure() # always run even if the previous steps fail
uses: actions/upload-artifact@v4
with:
name: ${{ steps.date.outputs.date }}-${{ env.SAFE_SDK_NAME }}-test-logs
path: package-testing/sdk-test-runner/logs/
- name: Publish Test Report
uses: mikepenz/action-junit-report@v5
if: success() || failure() # always run even if the previous steps fail
with:
report_paths: 'package-testing/sdk-test-runner/logs/results.xml'
# - name: Test Report
# if: success() || failure() # always run even if the previous steps fail
# run: |
# echo "Link to the rendered test report"
# pushd package-testing/sdk-test-runner
# ls logs
# cat logs/test_runner.log
# popd