-
Notifications
You must be signed in to change notification settings - Fork 6
83 lines (76 loc) · 2.41 KB
/
pr-tests.yaml
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
name: Pyatlan PR Tests
on:
pull_request:
workflow_dispatch:
jobs:
pyatlan-unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Run unit tests
env: # Test tenant environment variables
ATLAN_API_KEY: ${{ secrets.ATLAN_API_KEY }}
ATLAN_BASE_URL: ${{ secrets.ATLAN_BASE_URL }}
MARK_API_KEY: ${{ secrets.MARK_ATLAN_API_KEY }}
MARK_BASE_URL: https://mark.atlan.com
run: pytest tests/unit
pyatlan-integration-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
job_id:
[
"job1",
"job2",
"job3",
"job4",
"job5",
"job6",
"job7",
"job8",
"job9",
"job10",
"job11",
"job12",
"job13",
"job14",
"job15",
"job16",
"job17",
"job18",
"job19",
"job20",
]
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
sudo apt-get install -y jq
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Run integration tests
env: # Test tenant environment variables
ATLAN_API_KEY: ${{ secrets.ATLAN_API_KEY }}
ATLAN_BASE_URL: ${{ secrets.ATLAN_BASE_URL }}
MARK_API_KEY: ${{ secrets.MARK_ATLAN_API_KEY }}
MARK_BASE_URL: https://mark.atlan.com
run: |
DISTRIBUTED_TESTS=$(python3 st.py)
TEST_FILES=$(echo "${DISTRIBUTED_TESTS}" | jq -r --arg targetJob "${{ matrix.job_id }}" '.[$targetJob].test_files[]' | tr '\n' ' ')
echo "Running ${TEST_FILES}"
pytest ${TEST_FILES}