-
Notifications
You must be signed in to change notification settings - Fork 1.9k
74 lines (61 loc) · 2.17 KB
/
performance-tests.yml
File metadata and controls
74 lines (61 loc) · 2.17 KB
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
name: Performance Tests
on:
workflow_call:
jobs:
performance-tests:
name: Performance Tests
runs-on: ubuntu-latest
needs: []
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set-platform
run: |
echo "PLATFORM=linux-amd64" >> $GITHUB_ENV
- name: Load images from artifacts
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
with:
path: built-docker-image
pattern: built-docker-image-django-debian-linux-amd64
merge-multiple: true
- name: Load docker images
timeout-minutes: 10
run: |
docker load -i built-docker-image/django-debian-linux-amd64_img
docker images
- name: Set unit-test mode
run: docker/setEnv.sh unit_tests_cicd
- name: Start Postgres and webhook.endpoint
run: docker compose up --no-deps -d postgres webhook.endpoint
- name: Start uwsgi (idle)
timeout-minutes: 5
run: |
docker compose -f docker-compose.yml -f docker-compose.override.unit_tests_cicd.yml \
-f docker/docker-compose.override.performance_tests_cicd.yml \
up -d --no-deps uwsgi
env:
DJANGO_VERSION: debian
- name: Run performance tests (auto-update counts)
timeout-minutes: 15
run: python3 scripts/update_performance_test_counts.py
- name: Check counts are up to date
run: |
if ! git diff --quiet unittests/test_importers_performance.py; then
echo "Performance test counts are out of date. Fix them by running locally:"
echo ""
echo " python3 scripts/update_performance_test_counts.py"
echo ""
echo "Diff:"
git diff unittests/test_importers_performance.py
exit 1
else
echo "Performance test counts are up to date."
fi
- name: Logs
if: failure()
run: docker compose logs --tail="2500" uwsgi
- name: Shutdown
if: always()
run: docker compose down