-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (64 loc) · 2.06 KB
/
Copy pathpr-checks.yaml
File metadata and controls
82 lines (64 loc) · 2.06 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
name: Pull Request Checks
on:
pull_request:
branches:
- '*'
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install lint dependencies
run: make install
- name: Run ruff + mypy
run: make lint
test-core:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install core test dependencies
# core/sunbird_ai_core/base/*.py imports pyflink directly, but
# apache-flink is only declared as a dependency in each job's own
# pyproject.toml (pinned to match the Docker base image), not
# core's — install it explicitly here to match.
run: pip install -e "core/[test]" "apache-flink==1.20.5"
- name: Run core tests
run: pytest core/tests -m "not integration"
test-enrichment-router:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install enrichment-router test dependencies
run: pip install -e core/ -e "jobs/enrichment_router/[test]"
- name: Run enrichment-router tests
run: pytest jobs/enrichment_router/tests -m "not integration"
test-caption-generator:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install caption-generator test dependencies
run: pip install -e core/ -e "jobs/caption_generator/[test]"
- name: Run caption-generator tests
run: pytest jobs/caption_generator/tests -m "not integration"