-
Notifications
You must be signed in to change notification settings - Fork 11
91 lines (76 loc) · 2.11 KB
/
Copy pathpython_test.yml
File metadata and controls
91 lines (76 loc) · 2.11 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
---
name: python_test
'on':
workflow_dispatch:
push:
branches:
- master
pull_request:
schedule:
- cron: '47 1 * * 1'
permissions:
contents: read
jobs:
python_test:
permissions:
contents: read
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-24.04
python-version: ['3.10', 3.13]
# Py3.14 is currently blocked by PyCQA/bandit#1288
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Python ${{matrix.python-version}}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{matrix.python-version}}
- name: Set up Poetry
uses: snok/install-poetry@a783c322200f0519c7926aa6faa857c4e23e9263 # v1.4.2
- name: Install basic dependencies
env:
POETRY_INSTALLER_ONLY_BINARY: ":all:"
run: |
poetry install --with dev
- name: Run liter
run: |
./check_all_python_files.sh
- name: Test with pytest
run: |
poetry run pytest
check_examples:
permissions:
contents: read
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
python-version: ['3.10', 3.14]
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Python ${{matrix.python-version}}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{matrix.python-version}}
- name: Set up Poetry
uses: snok/install-poetry@a783c322200f0519c7926aa6faa857c4e23e9263 # v1.4.2
- name: Install basic dependencies
env:
POETRY_INSTALLER_ONLY_BINARY: ":all:"
run: |
poetry install
- name: Run examples
run: |
./run_all_examples.sh
...