-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (75 loc) · 2.54 KB
/
Copy pathtests.yml
File metadata and controls
85 lines (75 loc) · 2.54 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
name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allow this workflow to be called from other repositories.
workflow_call:
inputs:
python-versions:
required: false
type: string
# IMPORTANT: When updating these, also update below!!
default: '["3.10", "3.11", "3.12", "3.13", "3.14"]'
python-min:
required: false
type: string
default: '3.10'
python-max:
required: false
type: string
default: '3.14'
jobs:
run-tests:
name: ${{ matrix.experimental && '⚠️ ' || '' }}${{ matrix.os }}, ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
# IMPORTANT: When updating these, also update above!!
python-version: ${{ fromJSON(inputs.python-versions || '["3.10", "3.11", "3.12", "3.13", "3.14"]') }}
experimental: [false]
include:
- os: macos-latest
python-version: ${{ inputs.python-min || '3.10' }}
- os: macos-latest
python-version: ${{ inputs.python-max || '3.14' }}
# - os: ubuntu-latest
# python-version: '3.15'
# experimental: true
# - os: macos-latest
# python-version: '3.15'
# experimental: true
# - os: windows-latest
# python-version: '3.15'
# experimental: true
steps:
- uses: actions/checkout@v6
- name: Install poetry
shell: bash
run: pipx install poetry==2.4.1
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies with Poetry
continue-on-error: ${{ matrix.experimental }}
run: |
poetry install --with test --all-extras
poetry add git+https://github.com/AstarVienna/ScopeSim_Data.git
poetry env use "$(python -c 'import sys; print(sys.executable)')"
- name: Check Python version
run: poetry run python -V >> "$GITHUB_STEP_SUMMARY"
- name: Run Pytest with Poetry
continue-on-error: ${{ matrix.experimental }}
run: poetry run pytest -m "not webtest" --cov --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v7
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}