Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-bertin committed Jul 10, 2024
1 parent 99244ad commit c4240eb
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 24 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ jobs:
name: Publish package to PyPI
runs-on: ubuntu-latest
needs: tests
environment: release
permissions:
id-token: write

if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')

Expand All @@ -61,6 +64,4 @@ jobs:
# TODO: switch to verified publishers
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}

13 changes: 6 additions & 7 deletions docs/check_sphinx.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import subprocess


def test_linkcheck(tmpdir):
doctrees = tmpdir.join("doctrees")
htmldir = tmpdir.join("html")
subprocess.check_call(
["sphinx-build", "-W", "-blinkcheck", "-d", str(doctrees), ".", str(htmldir)],
)
# def test_linkcheck(tmpdir):
# doctrees = tmpdir.join("doctrees")
# htmldir = tmpdir.join("html")
# subprocess.check_call(
# ["sphinx-build", "-W", "-blinkcheck", "-d", str(doctrees), ".", str(htmldir)],
# )


def test_build_docs(tmpdir):
Expand Down
28 changes: 14 additions & 14 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. auth_matrix documentation master file, created by startproject.
.. maykin-auth-matrix documentation master file, created by startproject.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to auth_matrix's documentation!
Welcome to maykin-auth-matrix's documentation!
=================================================

|build-status| |code-quality| |black| |coverage| |docs|
Expand Down Expand Up @@ -33,28 +33,28 @@ Indices and tables
* :ref:`search`


.. |build-status| image:: https://github.com/maykinmedia/auth_matrix/workflows/Run%20CI/badge.svg
.. |build-status| image:: https://github.com/maykinmedia/maykin-auth-matrix/workflows/Run%20CI/badge.svg
:alt: Build status
:target: https://github.com/maykinmedia/auth_matrix/actions?query=workflow%3A%22Run+CI%22
:target: https://github.com/maykinmedia/maykin-auth-matrix/actions?query=workflow%3A%22Run+CI%22

.. |code-quality| image:: https://github.com/maykinmedia/auth_matrix/workflows/Code%20quality%20checks/badge.svg
.. |code-quality| image:: https://github.com/maykinmedia/maykin-auth-matrix/workflows/Code%20quality%20checks/badge.svg
:alt: Code quality checks
:target: https://github.com/maykinmedia/auth_matrix/actions?query=workflow%3A%22Code+quality+checks%22
:target: https://github.com/maykinmedia/maykin-auth-matrix/actions?query=workflow%3A%22Code+quality+checks%22

.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black

.. |coverage| image:: https://codecov.io/gh/maykinmedia/auth_matrix/branch/master/graph/badge.svg
:target: https://codecov.io/gh/maykinmedia/auth_matrix
.. |coverage| image:: https://codecov.io/gh/maykinmedia/maykin-auth-matrix/branch/master/graph/badge.svg
:target: https://codecov.io/gh/maykinmedia/maykin-auth-matrix
:alt: Coverage status

.. |docs| image:: https://readthedocs.org/projects/auth_matrix/badge/?version=latest
:target: https://auth_matrix.readthedocs.io/en/latest/?badge=latest
.. |docs| image:: https://readthedocs.org/projects/maykin-auth-matrix/badge/?version=latest
:target: https://maykin-auth-matrix.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. |python-versions| image:: https://img.shields.io/pypi/pyversions/auth_matrix.svg
.. |python-versions| image:: https://img.shields.io/pypi/pyversions/maykin-auth-matrix.svg

.. |django-versions| image:: https://img.shields.io/pypi/djversions/auth_matrix.svg
.. |django-versions| image:: https://img.shields.io/pypi/djversions/maykin-auth-matrix.svg

.. |pypi-version| image:: https://img.shields.io/pypi/v/auth_matrix.svg
:target: https://pypi.org/project/auth_matrix/
.. |pypi-version| image:: https://img.shields.io/pypi/v/maykin-auth-matrix.svg
:target: https://pypi.org/project/maykin-auth-matrix/
Empty file added py.test
Empty file.
Empty file added python
Empty file.
19 changes: 19 additions & 0 deletions testapp/settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from pathlib import Path

DEBUG = True

BASE_DIR = Path(__file__).resolve(strict=True).parent

SECRET_KEY = "so-secret-i-cant-believe-you-are-looking-at-this"
Expand Down Expand Up @@ -51,3 +53,20 @@
]

ROOT_URLCONF = "testapp.urls"

LOGGING = {
"version": 1,
"disable_existing_loggers": False,
"handlers": {
"console": {
"class": "logging.StreamHandler",
},
},
"loggers": {
"": { # 'root' logger
"handlers": ["console"],
"level": "DEBUG",
"propagate": True,
},
},
}

0 comments on commit c4240eb

Please sign in to comment.