-
Notifications
You must be signed in to change notification settings - Fork 1.2k
80 lines (72 loc) · 2.51 KB
/
framework-test.yml
File metadata and controls
80 lines (72 loc) · 2.51 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
name: Framework Python
on:
push:
branches:
- main
- 'release/framework-*'
pull_request:
branches:
- main
- 'release/framework-*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
FLWR_TELEMETRY_ENABLED: 0
jobs:
changes:
runs-on: ubuntu-22.04
outputs:
framework: ${{ steps.filter.outputs.framework }}
ex_bench: ${{ steps.filter.outputs.ex_bench }} # Examples and Benchmarks
steps:
- uses: actions/checkout@v5
- name: Filter changed paths
id: filter
uses: dorny/paths-filter@v3
with:
filters: |
framework:
- 'framework/**/*'
- 'dev/devtool/**'
- 'dev/pyproject.toml'
- 'dev/uv.lock'
- '.github/workflows/framework-test.yml'
ex_bench:
- 'examples/**/*'
- 'benchmarks/**/*'
- 'dev/test.sh'
- '.github/workflows/framework-test.yml'
test_core:
runs-on: ubuntu-22.04
needs: changes
strategy:
matrix:
# Latest version which comes cached in the host image can be found here:
# https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#python
# In case of a mismatch, the job has to download Python to install it.
python: ['3.10', '3.11', '3.12', '3.13']
name: Python ${{ matrix.python }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Bootstrap
if: ${{ needs.changes.outputs.framework == 'true' || needs.changes.outputs.ex_bench == 'true' }}
uses: ./.github/actions/bootstrap
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
if: ${{ needs.changes.outputs.framework == 'true' || needs.changes.outputs.ex_bench == 'true' }}
run: |
cd framework
python -m poetry install --all-extras
- name: Check if protos need recompilation
if: ${{ needs.changes.outputs.framework == 'true' }}
run: ./framework/dev/check-protos.sh
- name: Lint + Test (isort/black/docformatter/mypy/pylint/flake8/pytest)
if: ${{ needs.changes.outputs.framework == 'true' }}
run: ./framework/dev/test.sh
- name: Check benchmarks and examples
if: ${{ needs.changes.outputs.ex_bench == 'true' }}
run: ./dev/test.sh