-
Notifications
You must be signed in to change notification settings - Fork 0
123 lines (105 loc) · 3.6 KB
/
Copy pathci.yml
File metadata and controls
123 lines (105 loc) · 3.6 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
env:
PYTHONPATH: src
NODE_OPTIONS: --experimental-vm-modules
jobs:
python-tests:
name: Python Tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[test]" 2>/dev/null || pip install pytest pytest-asyncio pytest-mock numpy scipy
- name: Run core unit tests
run: |
python -m pytest \
tests/unit/test_core_events.py \
tests/unit/test_xg_model.py \
tests/unit/test_pitch_control.py \
tests/unit/test_player_rating.py \
tests/unit/test_formation_analysis.py \
tests/unit/test_offball_metrics.py \
tests/unit/test_substitution_analysis.py \
tests/unit/test_export_converters.py \
tests/unit/test_season_aggregator.py \
tests/unit/test_analysis_service_xg_xt.py \
tests/unit/test_analysis_service_extensions.py \
tests/unit/test_xt_model.py \
tests/unit/test_pass_network.py \
tests/unit/test_heatmap.py \
tests/unit/test_tactical_periods.py \
tests/unit/test_game_state.py \
tests/unit/test_security.py \
tests/unit/test_xa_model.py \
tests/unit/test_benchmarks.py \
tests/unit/test_match_timeline.py \
tests/unit/test_migration_manager.py \
tests/unit/test_logging.py \
tests/unit/test_win_probability.py \
tests/unit/test_psxg_model.py \
tests/unit/test_momentum.py \
tests/unit/test_defensive_actions.py \
tests/unit/test_transitions.py \
tests/unit/test_vaep.py \
tests/unit/test_set_piece_analysis.py \
tests/unit/test_storage_service.py \
tests/unit/test_cv_service.py \
tests/unit/test_api_external_services.py \
tests/e2e/test_e2e_pipeline.py \
tests/e2e/test_e2e_full_pipeline.py \
-v --tb=short
- name: Run expanded unit tests
continue-on-error: true
run: |
python -m pytest tests/unit/ --tb=line -q \
--ignore=tests/unit/test_audio_service.py \
-v
frontend-tests:
name: Frontend Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: src/kawkab/web/package-lock.json
- name: Install dependencies
run: npm ci
working-directory: src/kawkab/web
- name: Run Jest unit tests
run: npm test -- --watchAll=false --verbose
working-directory: src/kawkab/web
- name: Run Playwright E2E tests
continue-on-error: true
run: npx playwright test
working-directory: src/kawkab/web
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install ruff
run: pip install ruff
- name: Run ruff check
continue-on-error: true
run: ruff check src/