This repository has been archived by the owner on Jan 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
55 lines (47 loc) · 2.53 KB
/
tests.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
name: Python tests
on:
push:
branches: [ develop, dev/*, release/* ]
pull_request:
branches: [ develop , dev/*, release/* ]
jobs:
backend:
timeout-minutes: 20
strategy:
matrix:
python-versions: ['3.8', '3.9', '3.10', '3.11']
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-versions }}
- name: Install Tox
run: pip install tox
- name: Run linter and all tests except Pyodbc's, Pymysql's, Psycopg2's, and Fastparquet
if: matrix.python-versions == '3.10' && matrix.os == 'windows-latest'
env:
TOX_PARALLEL_NO_SPINNER: 1
run: tox -p all
- name: Ensure no usage of manager or repository classes without factory
if: matrix.python-versions == '3.10' && matrix.os == 'ubuntu-latest'
run: |
! grep -rP '_ScenarioManager(?!Factory)' taipy --exclude="_scenario_manager*.py" --exclude-dir="__pycache__"
! grep -rP '_DataManager(?!Factory)' taipy --exclude="_data_manager*.py" --exclude-dir="__pycache__"
! grep -rP '_TaskManager(?!Factory)' taipy --exclude="_task_manager*.py" --exclude-dir="__pycache__"
! grep -rP '_SequenceManager(?!Factory)' taipy --exclude="_sequence_manager*.py" --exclude-dir="__pycache__"
! grep -rP '_JobManager(?!Factory)' taipy --exclude="_job_manager*.py" --exclude-dir="__pycache__"
! grep -rP '_CycleManager(?!Factory)' taipy --exclude="_cycle_manager*.py" --exclude-dir="__pycache__"
! grep -rP '_ScenarioRepository(?!Factory)' taipy --exclude="_scenario_repository*.py" --exclude-dir="__pycache__"
! grep -rP '_DataRepository(?!Factory)' taipy --exclude="_data_repository*.py" --exclude-dir="__pycache__"
! grep -rP '_TaskRepository(?!Factory)' taipy --exclude="_task_repository*.py" --exclude-dir="__pycache__"
! grep -rP '_SequenceRepository(?!Factory)' taipy --exclude="_sequence_repository*.py" --exclude-dir="__pycache__"
! grep -rP '_JobRepository(?!Factory)' taipy --exclude="_job_repository*.py" --exclude-dir="__pycache__"
! grep -rP '_CycleRepository(?!Factory)' taipy --exclude="_cycle_repository*.py" --exclude-dir="__pycache__"
- name: Run all tests
if: matrix.python-versions != '3.10' || matrix.os != 'windows-latest'
env:
TOX_PARALLEL_NO_SPINNER: 1
run: tox -e all-tests