-
Notifications
You must be signed in to change notification settings - Fork 53
136 lines (136 loc) · 4.09 KB
/
Copy pathmain.yml
File metadata and controls
136 lines (136 loc) · 4.09 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
---
name: main
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
push:
branches:
- main
pull_request:
branches:
- '*'
jobs:
run-tests-linux:
name: Run tests on ubuntu-latest py${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- '312'
- '313'
- '314'
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.65.0
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
frozen: true
environments: tests-linux-py${{ matrix.python-version }}
- name: Run pytest
shell: bash -el {0}
run: pixi run -e tests-linux-py${{ matrix.python-version }} tests-with-cov
- name: Upload coverage report.
if: matrix.python-version == '312'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
run-tests-win-and-mac:
name: Run tests on ${{ matrix.os }} py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- windows-latest
python-version:
- '312'
- '313'
- '314'
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.65.0
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
frozen: true
environments: tests-py${{ matrix.python-version }}
- name: Run pytest
shell: bash -el {0}
run: pixi run -e tests-py${{ matrix.python-version }} tests-fast
run-tests-with-old-plotly:
name: Run tests on ubuntu-latest with plotly < 6
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.65.0
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
frozen: true
environments: tests-old-plotly
- name: Run pytest
shell: bash -el {0}
run: pixi run -e tests-old-plotly tests-fast
run-tests-nevergrad:
name: Run nevergrad tests py${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- '312'
- '313'
- '314'
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.65.0
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
frozen: true
environments: tests-nevergrad-py${{ matrix.python-version }}
- name: Run pytest
shell: bash -el {0}
run: >-
pixi run -e tests-nevergrad-py${{ matrix.python-version }}
pytest tests/optimagic/optimizers/test_nevergrad.py
code-in-docs:
name: Run code snippets in documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.65.0
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
frozen: true
environments: tests-linux-py314
- name: Run doctest
shell: bash -el {0}
run: >-
pixi run -e tests-linux-py314
python -m doctest -v docs/source/how_to/how_to_constraints.md
run-mypy:
name: Run mypy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.65.0
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
frozen: true
environments: type-checking
- name: Run mypy
shell: bash -el {0}
run: pixi run -e type-checking mypy