-
Notifications
You must be signed in to change notification settings - Fork 121
94 lines (81 loc) · 2.42 KB
/
system-testing.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
name: System Testing
on:
push:
branches:
- master
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
pull_request:
branches:
- master
defaults:
run:
shell: bash
concurrency:
group: ${{ github.ref_name }}-system-testing
cancel-in-progress: true
jobs:
system-testing:
name: System Testing
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Get vars
id: vars
run: |
echo "nginx_version=$(grep -m1 'FROM nginx:' <Dockerfile | awk -F'[: ]' '{print $3}')" >> $GITHUB_OUTPUT
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
cache: "pip"
- name: Install Dependencies
run: pip install -r test/requirements.ci.txt
- name: Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build nginx
uses: docker/build-push-action@v6
with:
pull: true
load: true
file: test/Dockerfile-test
tags: nginx-opentracing-test/nginx
cache-from: type=gha,scope=system-nginx
cache-to: type=gha,scope=system-nginx,mode=max
build-args: |
NGINX_VERSION=${{ steps.vars.outputs.nginx_version }}
- name: Build backend
uses: docker/build-push-action@v6
with:
pull: true
load: true
file: test/Dockerfile-backend
context: test
tags: nginx-opentracing-test/backend
cache-from: type=gha,scope=system-backend
cache-to: type=gha,scope=system-backend,mode=max
- name: Build grpc-backend
uses: docker/build-push-action@v6
with:
pull: true
load: true
file: test/environment/grpc/Dockerfile
context: test/environment/grpc
tags: nginx-opentracing-test/grpc-backend
cache-from: type=gha,scope=system-grpc-backend
cache-to: type=gha,scope=system-grpc-backend,mode=max
- name: Run Tests
run: |
mkdir -p test-log
python3 nginx_opentracing_test.py
env:
PYTHONPATH: environment/grpc
LOG_DIR: ${{ github.workspace }}/test/test-log
working-directory: test
- name: Upload artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: test-log
path: ./test/test-log