Skip to content

Commit

Permalink
Update to actions (#272)
Browse files Browse the repository at this point in the history
* Update to actions

* Fix all warnings found by new CI
  • Loading branch information
nabobalis authored Jan 6, 2024
1 parent b9b0911 commit de37cf0
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 105 deletions.
91 changes: 91 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: CI

on:
push:
branches:
- 'main'
- '*.*'
- '!*backport*'
tags:
- 'v*'
- '!*dev*'
- '!*pre*'
- '!*post*'
pull_request:
workflow_dispatch:
schedule:
# ┌───────── minute (0 - 59)
# │ ┌───────── hour (0 - 23)
# │ │ ┌───────── day of the month (1 - 31)
# │ │ │ ┌───────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────── day of the week (0 - 6 or SUN-SAT)
- cron: '0 7 * * *' # Every day at 07:00 UTC

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
core:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
submodules: false
coverage: codecov
libraries: |
apt:
- pandoc
- graphviz
envs: |
- linux: py312-sphinx7
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

test:
needs: [core]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
submodules: false
coverage: codecov
libraries: |
brew:
- pandoc
- graphviz
choco:
- pandoc
- graphviz
apt:
- pandoc
- graphviz
envs: |
- linux: py311-sphinx6
- macos: py310-sphinx5
- windows: py39-sphinx5
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

docs:
needs: [test]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
default_python: '3.9'
submodules: false
pytest: false
envs: |
- linux: py312-docs
extras:
needs: [test]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
default_python: '3.9'
submodules: false
coverage: codecov
libraries: |
apt:
- pandoc
- graphviz
envs: |
- linux: py312-sphinxdev
- linux: py312-conda
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
89 changes: 0 additions & 89 deletions azure-pipelines.yml

This file was deleted.

5 changes: 3 additions & 2 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from pathlib import Path

import docutils
import pytest
import sphinx
from sphinx.testing.path import path

# Load app, status and warning fixtures.
pytest_plugins = ["sphinx.testing.fixtures"]
Expand All @@ -18,7 +19,7 @@ def pytest_report_header(config):

@pytest.fixture(scope="session")
def rootdir():
return path(__file__).parent.abspath() / "roots"
return Path(__file__).parent.absolute() / "roots"


@pytest.fixture(scope="function", autouse=True)
Expand Down
12 changes: 2 additions & 10 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import re
from pathlib import Path

from pkg_resources import get_distribution
from packaging.version import parse as _parse
from sphinx import addnodes

import ablog
Expand All @@ -22,11 +22,7 @@
"myst_parser",
]

versionmod = get_distribution("ablog")
version = ".".join(versionmod.version.split(".")[:3])
release = versionmod.version.split("+")[0]
is_development = ".dev" in release

version = str(_parse(ablog.__version__))
project = "ABlog"
copyright = "2014-2022, ABlog Team"
master_doc = "index"
Expand All @@ -35,13 +31,11 @@
".md": "markdown",
}
exclude_patterns = ["_build", "docs/manual/.ipynb_checkpoints"]

html_title = "ABlog"
html_use_index = True
html_domain_indices = False
html_show_sourcelink = True
html_favicon = "_static/ablog.ico"

blog_title = "ABlog"
blog_baseurl = "https://ablog.readthedocs.io/"
blog_locations = {
Expand Down Expand Up @@ -74,7 +68,6 @@
disqus_shortname = "https-ablog-readthedocs-io"
disqus_pages = True
fontawesome_link_cdn = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css"

html_style = "alabaster.css"
html_theme = "alabaster"
html_sidebars = {
Expand All @@ -98,7 +91,6 @@
"description": "ABlog for blogging with Sphinx",
"logo": "ablog.png",
}

intersphinx_mapping = {
"python": ("https://docs.python.org/", None),
"sphinx": ("https://www.sphinx-doc.org/en/master/", None),
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ filterwarnings =
always::pytest.PytestConfigWarning
# Sphinx and other packages raise these
ignore:'imghdr' is deprecated and slated for removal in Python 3.13:DeprecationWarning
# python-datetuil
ignore:datetime.datetime.utcfromtimestamp:DeprecationWarning

[pycodestyle]
max_line_length = 120
Expand Down
7 changes: 3 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[tox]
envlist =
py{39,310,311}{-sphinx5,-sphinx6,-sphinx7,-sphinxdev,-docs,-linkcheck}
isolated_build = true
py{39,310,311,312}{-sphinx5,-sphinx6,-sphinx7,-sphinx8,-sphinxdev,-docs,-linkcheck}

[testenv]
allowlist_externals =
Expand All @@ -17,8 +16,8 @@ commands =
sphinx5: pip install -U "sphinx>=5.0,<6.0"
sphinx6: pip install -U "sphinx>=6.0,<7.0"
sphinx7: pip install -U "sphinx>=7.0,<8.0"
# TODO: Figure this out on azure
# sphinxdev: pip install -U "git+https://repo.or.cz/docutils.git#egg=docutils&subdirectory=docutils"
sphinx8: pip install -U "sphinx>=8.0,<9.0"
sphinxdev: pip install -U "git+https://repo.or.cz/docutils.git#egg=docutils&subdirectory=docutils"
sphinxdev: pip install -U "git+https://github.com/sphinx-doc/sphinx"
pip freeze --all --no-input
pytest -vvv -r a --pyargs ablog
Expand Down

0 comments on commit de37cf0

Please sign in to comment.