Skip to content

Commit 6481949

Browse files
authored
Merge pull request #301 from sunpy/ci
2 parents d606c6b + b452a5c commit 6481949

File tree

7 files changed

+67
-59
lines changed

7 files changed

+67
-59
lines changed

.circleci/config.yml

-16
This file was deleted.

.github/dependabot.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"

.github/workflows/ci.yml

+56-16
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
- "!*pre*"
1313
- "!*post*"
1414
pull_request:
15+
# Allow manual runs through the web UI
1516
workflow_dispatch:
1617
schedule:
1718
# ┌───────── minute (0 - 59)
@@ -36,16 +37,15 @@ jobs:
3637
- pandoc
3738
- graphviz
3839
envs: |
39-
- linux: py312-sphinx8
40+
- linux: py313-sphinx8
4041
secrets:
4142
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4243

43-
tests:
44+
test:
4445
needs: [core]
4546
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
4647
with:
4748
submodules: false
48-
coverage: codecov
4949
libraries: |
5050
brew:
5151
- pandoc
@@ -57,16 +57,27 @@ jobs:
5757
- pandoc
5858
- graphviz
5959
envs: |
60-
- macos: py311-sphinx7
61-
- windows: py310-sphinx7
62-
- linux: py310-sphinx6
60+
- macos: py312-sphinx8
61+
- windows: py311-sphinx8
62+
- linux: py310-sphinx8
6363
- linux: py312-pydata-sphinx-theme
64-
- linux: py312-devdeps
65-
secrets:
66-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
64+
- linux: py313-devdeps
6765
68-
extras:
69-
needs: [tests]
66+
extra_tests:
67+
needs: [test]
68+
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
69+
with:
70+
submodules: false
71+
libraries: |
72+
apt:
73+
- pandoc
74+
- graphviz
75+
envs: |
76+
- linux: py312-pydata-sphinx-theme
77+
- linux: py313-devdeps
78+
79+
docs:
80+
needs: [core]
7081
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
7182
with:
7283
submodules: false
@@ -76,12 +87,23 @@ jobs:
7687
- pandoc
7788
- graphviz
7889
envs: |
79-
- linux: py312-docs
80-
- linux: pydata-sphinx-theme-dev
81-
- linux: py312-linkcheck
90+
- linux: py313-docs
91+
- linux: py313-linkcheck
92+
93+
sdist_verify:
94+
runs-on: ubuntu-latest
95+
steps:
96+
- uses: actions/checkout@v4
97+
- uses: actions/setup-python@v5
98+
with:
99+
python-version: "3.13"
100+
- run: python -m pip install -U --user build
101+
- run: python -m build . --sdist
102+
- run: python -m pip install -U --user twine
103+
- run: python -m twine check dist/*
82104

83105
conda:
84-
needs: [tests]
106+
needs: [test]
85107
runs-on: ubuntu-latest
86108
steps:
87109
- uses: actions/checkout@v4
@@ -92,7 +114,7 @@ jobs:
92114
with:
93115
activate-environment: ablog-test
94116
environment-file: ablog-conda-test-env.yml
95-
python-version: "3.12"
117+
python-version: "3.13"
96118
- name: Install ablog
97119
shell: bash -el {0}
98120
run: |
@@ -101,5 +123,23 @@ jobs:
101123
shell: bash -el {0}
102124
run: |
103125
conda list
126+
cd /tmp
104127
pytest -vvv -r a --pyargs ablog
105128
make tests
129+
130+
publish:
131+
# Build wheels on PRs only when labelled. Releases will only be published if tagged ^v.*
132+
# see https://github-actions-workflows.openastronomy.org/en/latest/publish.html#upload-to-pypi
133+
if: |
134+
github.event_name != 'pull_request' ||
135+
(
136+
github.event_name == 'pull_request' &&
137+
contains(github.event.pull_request.labels.*.name, 'Run publish')
138+
)
139+
needs: [test, docs, sdist_verify]
140+
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@main
141+
with:
142+
python-version: "3.13"
143+
submodules: false
144+
secrets:
145+
pypi_token: ${{ secrets.PYPI_TOKEN }}

.github/workflows/pythonpublish.yml

-26
This file was deleted.

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -195,3 +195,4 @@ test/
195195
pydata-sphinx-theme/
196196
_build
197197
demo/
198+
src/ablog/_version.py

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ Warning
2323

2424
**This version is maintained with the aim to keep it working for SunPy Project website and thus new features or bugfixes are highly unlikely unless they directly impact the SunPy Project**
2525

26-
**We strongly encourage users and interested in parties in submitting patches to ``ablog``**
26+
**We strongly encourage users and interested in parties in submitting patches to ablog**

src/ablog/tests/test_parallel.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
from pathlib import Path
22
from subprocess import run
3+
import sys
4+
import pytest
35

46

7+
@pytest.mark.xfail("win" in sys.platform, reason="Passes on Windows")
58
def test_not_safe_for_parallel_read(rootdir: Path, tmp_path: Path):
69
"""
710
Ablog is NOT safe for parallel read.

0 commit comments

Comments
 (0)