Skip to content

Commit 50f6bfb

Browse files
committed
updates docs
1 parent aa1612c commit 50f6bfb

File tree

16 files changed

+659
-471
lines changed

16 files changed

+659
-471
lines changed

.github/workflows/docs.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: "Documentation"
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- master
8+
schedule:
9+
- cron: "37 23 * * 2"
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
19+
20+
jobs:
21+
# changes:
22+
# runs-on: ubuntu-latest
23+
# timeout-minutes: 1
24+
# defaults:
25+
# run:
26+
# shell: bash
27+
# outputs:
28+
# docs: ${{ steps.changed_files.outputs.docs }}
29+
# steps:
30+
# - name: Checkout code
31+
# uses: actions/[email protected]
32+
# - id: changed_files
33+
# name: Check for file changes
34+
# uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0
35+
# with:
36+
# base: ${{ github.ref }}
37+
# token: ${{ github.token }}
38+
# filters: .github/file-filters.yml
39+
generate:
40+
name: Generate
41+
# if: needs.changes.outputs.docs == 'true'
42+
# needs: changes
43+
runs-on: ubuntu-latest
44+
env:
45+
PYTHONPATH: src/
46+
steps:
47+
- uses: actions/checkout@v4
48+
49+
- name: Set up Python
50+
uses: actions/setup-python@v4
51+
with:
52+
python-version: "3.12"
53+
54+
- uses: yezz123/setup-uv@v4
55+
56+
- uses: actions/cache/restore@v4
57+
id: restore-cache
58+
with:
59+
path: .venv
60+
key: ${{ runner.os }}-${{ hashFiles('**/uv.lock') }}
61+
62+
- name: Install dependencies
63+
run: uv sync --only-group docs
64+
65+
- name: Build Doc
66+
run: .venv/bin/mkdocs build -d ./docs-output
67+
68+
- uses: actions/cache/save@v4
69+
id: cache
70+
if: always() && steps.restore-cache.outputs.cache-hit != 'true'
71+
with:
72+
path: .venv
73+
key: ${{ runner.os }}-${{ hashFiles('**/uv.lock') }}
74+
- name: Upload artifact
75+
uses: actions/upload-pages-artifact@v3
76+
with:
77+
path: ./docs-output
78+
79+
# Deployment job
80+
deploy:
81+
needs: generate
82+
environment:
83+
name: github-pages
84+
url: ${{ steps.deployment.outputs.page_url }}
85+
runs-on: ubuntu-latest
86+
steps:
87+
- name: Deploy to GitHub Pages
88+
id: deployment
89+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ build
77
__pycache__
88
docs/_build
99
/src/pytest_echo/version.py
10+
!docs/src/.pages
1011
!.gitignore
1112
!.github
1213
!.coveragerc

.readthedocs.yaml

Lines changed: 0 additions & 35 deletions
This file was deleted.

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ versions](https://img.shields.io/pypi/pyversions/pytest-echo.svg)](https://pypi.
66
[![tests](https://github.com/pytest-dev/pytest-echo/actions/workflows/tests.yml/badge.svg)](https://github.com/pytest-dev/pytest-echo/actions/workflows/tests.yml)
77
[![Downloads](https://static.pepy.tech/badge/pytest-echo/month)](https://pepy.tech/project/pytest-echo)
88
[![Coverage](https://codecov.io/gh/pytest-dev/pytest-echo/branch/develop/graph/badge.svg)](https://codecov.io/gh/pytest-dev/pytest-echo)
9-
[![Documentation](https://readthedocs.org/projects/pytest-echo/badge/?version=latest)](https://pytest-echo.readthedocs.io/en/latest/)
9+
[![Documentation](https://github.com/pytest-dev/pytest-echo/actions/workflows/docs.yml/badge.svg)](https://github.com/pytest-dev/pytest-echo/)
1010

1111
Print environment variables, package version and generic attributes,
1212
as they are at the beginning of the test.
@@ -15,15 +15,15 @@ Useful in the continuous integration to dump test
1515
configuration/environment and or to check if attributes are properly set
1616
(ie. you change environment with `os.environ`)
1717

18-
# Install
18+
## Install
1919

2020
install via::
2121

2222
pip install pytest-echo
2323

24-
# Examples
24+
## Examples
2525

26-
## Dump environment variables
26+
### Dump environment variables
2727

2828
$ pytest --echo-env=HOME
2929
============================= test session starts =========================
@@ -32,7 +32,7 @@ install via::
3232
HOME: /Users/sax
3333
plugins: echo, pydev, cov, cache, django
3434

35-
## Dump package version
35+
### Dump package version
3636

3737
$ pytest --echo-version=pytest_echo
3838
============================= test session starts =========================
@@ -48,7 +48,7 @@ install via::
4848
> level code is executed. This should be not an issue as no problematic code
4949
> should be present in the first level of the package
5050
51-
## Dump attributes
51+
### Dump attributes
5252

5353
$ pytest --echo-attr=django.conf.settings.DEBUG
5454
============================= test session starts =========================
@@ -63,7 +63,7 @@ install via::
6363
6464
> [!NOTE] You cannot dump callable result.
6565
66-
## Configure via tox.ini/setup.cfg/pytest.cfg
66+
### Configure via tox.ini/setup.cfg/pytest.cfg
6767

6868
Example of use in a django project:
6969

@@ -100,7 +100,7 @@ Example of use in a django project:
100100
.............
101101
14 passed in 4.95 seconds
102102

103-
## Globbing
103+
### Globbing
104104

105105
Starting from version 1.5, is possible to glob packages version and environment variables,
106106
as:

docs/Makefile

Lines changed: 0 additions & 153 deletions
This file was deleted.

docs/changelog.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)