Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: CI

"on":
push:
branches: [master, main]
pull_request:
branches: [master, main]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install ruff pytest

- name: Run ruff format check
run: ruff format --check .

- name: Run ruff lint
run: ruff check .

- name: Run tests
run: |
# Run pytest if test files exist, otherwise just import the module
if [ -d "tests" ] || find . -name "*test*.py" -type f | grep -q .; then
pytest
else
python -c "import sphinxcontrib.googleanalytics; print('Module import successful')"
fi
10 changes: 1 addition & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "sphinxcontrib-googleanalytics"
version = "0.4"
license = {text = "BSD"}
license = "BSD-3-Clause"
authors = [{name = "Domen Kozar", email = "domen@dev.si"}]
maintainers = [{name = "Jelmer Vernooij", email = "jelmer@jelmer.uk"}]
description = "Sphinx extension googleanalytics"
Expand All @@ -15,7 +15,6 @@ classifiers = [
"Environment :: Console",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Documentation",
Expand All @@ -31,15 +30,8 @@ Repository = "https://github.com/sphinx-contrib/googleanalytics"
[tool.setuptools]
zip-safe = false
include-package-data = true
namespace-packages = ["sphinxcontrib"]
platforms = ["any"]

[tool.setuptools.packages]
find = {namespaces = false}

[tool.distutils.egg_info]
tag-build = "dev"
tag-date = true

[tool.aliases]
release = "egg_info -RDb ''"