-
Notifications
You must be signed in to change notification settings - Fork 57
58 lines (48 loc) · 1.54 KB
/
runtime_pipeline_unittest.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
name: Runtime Pipeline Unittest
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 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 Dependencies
run: |
cd runtime/bamboo-pipeline/
poetry install
poetry run pip install "Django>${{ matrix.django-version }}"
- name: Run Tests
run: |
cp -r bamboo_engine runtime/bamboo-pipeline/test
cp -r runtime/bamboo-pipeline/pipeline runtime/bamboo-pipeline/test
cd runtime/bamboo-pipeline/test
poetry run coverage run --source="." manage.py test pipeline.tests
poetry run coverage report -m
env:
PIPELINE_TEST_DB_TYPE: mysql
PIPELINE_TEST_DB_NAME: pipeline_test
PIPELINE_TEST_DB_USER: root
PIPELINE_TEST_DB_PWD: root