-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
172 lines (132 loc) · 4.97 KB
/
test.yml
File metadata and controls
172 lines (132 loc) · 4.97 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# Run unitary test
name: test
on:
workflow_call:
jobs:
source-code-checks:
runs-on: ubuntu-24.04
timeout-minutes: 5
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# - name: Check formatting with Ruff
# uses: chartboost/ruff-action@e18ae971ccee1b2d7bbef113930f00c670b78da4 # v1
# with:
# args: 'format --check'
- name: Check linting with Ruff
uses: chartboost/ruff-action@e18ae971ccee1b2d7bbef113930f00c670b78da4 # v1
with:
args: 'check'
# - name: Static type check
# run: |
# echo "Skipping static type check for the moment, too much error...";
# # pip install pyright
# # pyright glances
test-linux:
needs: source-code-checks
# https://github.com/actions/runner-images?tab=readme-ov-file#available-images
runs-on: ubuntu-24.04
timeout-minutes: 15
strategy:
matrix:
# Python EOL version are note tested
# Multiple Python version only tested for Linux
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
if [ -f dev-requirements.txt ]; then python -m pip install -r dev-requirements.txt; fi
if [ -f requirements.txt ]; then python -m pip install -r requirements.txt; fi
- name: Unitary tests
run: |
python -m pytest ./tests/test_core.py
test-windows:
needs: source-code-checks
# https://github.com/actions/runner-images?tab=readme-ov-file#available-images
runs-on: windows-2025
timeout-minutes: 15
strategy:
matrix:
# Windows-curses not available for Python 3.14 for the moment
# See https://github.com/zephyrproject-rtos/windows-curses/issues/76
python-version: ["3.13"]
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
if (Test-Path -PathType Leaf "dev-requirements.txt") { python -m pip install -r dev-requirements.txt }
if (Test-Path -PathType Leaf "requirements.txt") { python -m pip install -r requirements.txt }
pip install .
- name: Unitary tests
run: |
python -m pytest ./tests/test_core.py
test-macos:
needs: source-code-checks
# https://github.com/actions/runner-images?tab=readme-ov-file#available-images
runs-on: macos-15
timeout-minutes: 15
strategy:
matrix:
# Only test the latest stable version
python-version: ["3.14"]
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
if [ -f dev-requirements.txt ]; then python -m pip install -r dev-requirements.txt; fi
if [ -f requirements.txt ]; then python -m pip install -r requirements.txt; fi
- name: Unitary tests
run: |
python -m pytest ./tests/test_core.py
# test-freebsd:
# needs: source-code-checks
# runs-on: ubuntu-latest
# strategy:
# matrix:
# # Only test the latest stable version
# python-version: ["3.14"]
# steps:
# - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
# with:
# python-version: ${{ matrix.python-version }}
# cache: 'pip'
# - name: Install dependencies
# uses: vmactions/freebsd-vm@v1
# with:
# usesh: true
# run: |
# pkg install -y python3 gcc devel/py-pip
# python3 --version
# if [ -f dev-requirements.txt ]; then python3 -m pip install -r dev-requirements.txt; fi
# if [ -f requirements.txt ]; then python3 -m pip install -r requirements.txt; fi
# - name: Unitary tests
# uses: vmactions/freebsd-vm@v1
# with:
# usesh: true
# run: |
# python3 -m pytest ./tests/test_core.py