-
Notifications
You must be signed in to change notification settings - Fork 57
72 lines (60 loc) · 1.81 KB
/
pipeline_end_to_end_test.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
name: Pipeline End To End Test
on:
workflow_call:
jobs:
build:
runs-on: ubuntu-20.04
env:
DB_DATABASE: pipeline_test
DB_USER: root
DB_PASSWORD: root
strategy:
matrix:
python-version: [3.6, 3.7]
django-version: [2.2, 3.0]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up MySQL
run: |
sudo /etc/init.d/mysql start
mysql -e 'CREATE DATABASE ${{ env.DB_DATABASE }} default character set utf8mb4 collate utf8mb4_unicode_ci;' -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }}
- name: Set up Redis
uses: supercharge/[email protected]
with:
redis-version: 5
- name: Set up Rabbitmq
uses: nijel/[email protected]
with:
rabbitmq version: 3
- name: Set up Poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.1.9
- name: Install urllib3
run: |
python -m pip install urllib3==1.26.9
- name: Install dependency
run: |
cd runtime/bamboo-pipeline/test
poetry install
poetry run pip install "Django>${{ matrix.django-version }}"
- name: Run test
run: |
cd runtime/bamboo-pipeline/test
cp -r ../../../bamboo_engine/ .
cp -r ../pipeline .
poetry run python manage.py migrate
poetry run python manage.py celery worker &
while ! poetry run celery inspect ping; do
sleep 1
done
poetry run pytest pipeline_test_use/tests
env:
PIPELINE_TEST_DB_TYPE: mysql
PIPELINE_TEST_DB_NAME: pipeline_test
PIPELINE_TEST_DB_USER: root
PIPELINE_TEST_DB_PWD: root