Skip to content

Commit

Permalink
adding files for docs and testing with pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
luissian committed Mar 1, 2024
1 parent 9efcc58 commit 74a528a
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Python tests
# This workflow is triggered on pushes and PRs to the repository.
# Only run if we changed a Python file
on:
push:
branches:
- dev
paths-ignore:
- "docs/**"
- "CHANGELOG.md"
pull_request:
paths-ignore:
- "docs/**"
- "CHANGELOG.md"
release:
types: [published]
workflow_dispatch:
inputs:
runners:
description: "Runners to test on"
type: choice
options:
- "ubuntu-latest"
- "self-hosted"
default: "self-hosted"

# Cancel if a newer run with the same workflow name is queued
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:

test:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.10

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: |
pytest
19 changes: 19 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Read the Docs configuration file for MkDocs projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"

mkdocs:
configuration: mkdocs.yml

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
4 changes: 4 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Sphinx>=3.3.1
sphinxcontrib-napoleon
sphinx_rtd_theme>=0.5.0
myst-parser
6 changes: 6 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[pytest]
filterwarnings =
ignore::pytest.PytestRemovedIn8Warning:_pytest.nodes:140
testpaths =
tests
python_files = test_*.py
Empty file added test/__init__.py
Empty file.

0 comments on commit 74a528a

Please sign in to comment.