-
Notifications
You must be signed in to change notification settings - Fork 16
139 lines (131 loc) · 4.04 KB
/
ci.yml
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
name: CI
on:
push:
branches:
- 'main'
- '*.*'
- '!*backport*'
tags:
- 'v*'
- '!*dev*'
- '!*pre*'
- '!*post*'
pull_request:
# Allow manual runs through the web UI
workflow_dispatch:
jobs:
core:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
posargs: '--ascii-dbase-root ~/.chianti'
toxdeps: tox-pypi-filter
envs: |
- linux: py312
coverage: 'codecov'
cache-path: ~/.chianti
cache-key: chianti-${{ github.event.number }}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
tests:
needs: [core]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
posargs: '--ascii-dbase-root ~/.chianti'
toxdeps: tox-pypi-filter
envs: |
- macos: py311
- windows: py310
coverage: 'codecov'
cache-path: ~/.chianti
cache-key: chianti-${{ github.event.number }}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
test_full_database:
if: |
(
github.event_name != 'pull_request' && (
github.ref_name != 'main' ||
github.event_name == 'workflow_dispatch'
)
) || (
github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'Run full database tests')
)
needs: [tests]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
posargs: '--ascii-dbase-root ~/.chianti --include-all-files'
toxdeps: tox-pypi-filter
envs: |
- linux: py311
cache-path: ~/.chianti
cache-key: chianti-${{ github.event.number }}
test_database_v7:
if: |
(
github.event_name != 'pull_request' && (
github.ref_name != 'main' ||
github.event_name == 'workflow_dispatch'
)
) || (
github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'Run v7 tests')
)
needs: [tests]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
posargs: '--ascii-dbase-root ~/.chianti --ascii-dbase-url http://download.chiantidatabase.org/CHIANTI_v7.1.4_database.tar.gz --disable-file-hash --skip-version-check'
toxdeps: tox-pypi-filter
envs: |
- linux: py311
test_database_v9:
if: |
(
github.event_name != 'pull_request' && (
github.ref_name != 'main' ||
github.event_name == 'workflow_dispatch'
)
) || (
github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'Run v9 tests')
)
needs: [tests]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
posargs: '--ascii-dbase-root ~/.chianti --ascii-dbase-url http://download.chiantidatabase.org/CHIANTI_v9.0.1_database.tar.gz --disable-file-hash --skip-version-check'
toxdeps: tox-pypi-filter
envs: |
- linux: py311
docs:
needs: [tests]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
toxdeps: tox-pypi-filter
envs: |
- linux: build_docs-gallery
python-version: '3.12'
libraries: |
apt:
- graphviz
publish:
# Build wheels when pushing to any branch except main
# publish.yml will only publish if tagged ^v.*
if: |
(
github.event_name != 'pull_request' && (
github.ref_name != 'main' ||
github.event_name == 'workflow_dispatch'
)
) || (
github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'Run publish')
)
needs: [tests,test_full_database]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@main
with:
test_extras: 'dev'
test_command: 'pytest -p no:warnings --doctest-rst --pyargs fiasco'
submodules: false
python-version: '3.12'
secrets:
pypi_token: ${{ secrets.PYPI_TOKEN }}