-
Notifications
You must be signed in to change notification settings - Fork 0
128 lines (121 loc) · 3.3 KB
/
ci_tests.yml
File metadata and controls
128 lines (121 loc) · 3.3 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
---
name: CI Tests
on:
workflow_dispatch:
pull_request:
branches: [ main, develop ]
schedule:
# run every Monday at 6am UTC
- cron: '0 6 * * 1'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
SETUP_XVFB: True # avoid issues if mpl tries to open a GUI window
TOXARGS: '-v'
jobs:
ci-tests:
name: Tox env ${{ matrix.python }}-${{ matrix.toxenv }}
permissions:
contents: read
pull-requests: write
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
python:
- "3.11"
- "3.12"
- "3.13"
toxenv:
- test
- test-numpydev
- test-astropydev
- test-alldeps
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
- name: Install base dependencies
run: |
sudo apt update
sudo apt-get install -y freeglut3-dev
python -m pip install --upgrade pip tox
- name: Test with tox
run: |
tox -e ${{ matrix.python }}-${{ matrix.toxenv }}
- name: Upload coverage to codecov
if: endsWith(matrix.tox_env, '-cov')
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
os-tests:
name: Python ${{ matrix.python }} on ${{ matrix.os }}
permissions:
contents: read
pull-requests: write
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-latest
- macos-latest
python:
- "3.11"
- "3.12"
- "3.13"
toxenv:
- test-alldeps
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
- name: Install base dependencies
run: |
python -m pip install --upgrade pip tox
- name: Test with tox
run: |
tox -e ${{ matrix.python }}-${{ matrix.toxenv }}
conda:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v6
- name: Conda environment check
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install base dependencies
run: |
sudo apt update
sudo apt-get install -y freeglut3-dev
python -m pip install --upgrade pip tox
- name: Run obstools tests from environment built with conda
run: |
tox -e conda
codestyle:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Python codestyle check
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pycodestyle
- name: Check for runtime errors using pycodestyle
run: |
pycodestyle obstools --count --select=E9