Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e9df761

Browse files
committed
Update workflows
1 parent 6605e6d commit e9df761

12 files changed

+1426
-2950
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,20 @@ jobs:
2626
name: Build and Test
2727
runs-on: ubuntu-latest
2828

29+
env:
30+
BUBBLEWRAP_ARGUMENTS: |
31+
--unshare-all \
32+
--clearenv \
33+
--ro-bind / / \
34+
--bind ${{ github.workspace }} ${{ github.workspace }} \
35+
--tmpfs $HOME \
36+
--tmpfs /tmp \
37+
--tmpfs /var \
38+
--dev /dev \
39+
--proc /proc \
40+
--die-with-parent \
41+
--new-session \
42+
2943
strategy:
3044
matrix:
3145
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
@@ -39,42 +53,29 @@ jobs:
3953
with:
4054
python-version: "${{ matrix.python-version }}"
4155

42-
- name: Install dependencies
56+
- name: Configure dependencies
4357
run: |
44-
sudo ethtool -K eth0 tx off rx off
4558
sudo apt install bubblewrap
46-
export PIPENV_VENV_IN_PROJECT=1
47-
export PIP_IGNORE_INSTALLED=1
48-
pip install --no-cache-dir --user pip setuptools pipenv build
59+
pip install --user pipx
60+
pipx ensurepath
61+
pipx install poetry
62+
pipx install poethepoet
63+
poetry install --with dev
4964
5065
- name: Run tests
5166
run: |
52-
pipenv shell
53-
pipenv install -d
54-
bwrap \
55-
--unshare-all \
56-
--clearenv \
57-
--setenv EXAMPLE VALUE \
58-
--ro-bind / / \
59-
--bind ${{ github.workspace }} ${{ github.workspace }} \
60-
--tmpfs $HOME \
61-
--tmpfs /tmp \
62-
--tmpfs /var \
63-
--tmpfs /run --dir /run/user/$(id -u) \
64-
--dev /dev \
65-
--proc /proc \
66-
--die-with-parent \
67-
--new-session \
68-
python -m pipenv run coverage run -m unittest
69-
exit
67+
bwrap $BUBBLEWRAP_ARGUMENTS poetry run poe test
7068
71-
- name: Run linting
72-
run: pre-commit run --all-files
69+
- name: Run lint
70+
run: |
71+
poetry run poe lint:install
72+
bwrap $BUBBLEWRAP_ARGUMENTS poetry run poe lint
7373
7474
- if: ${{ matrix.python-version == '3.10' }}
7575
name: Upload coverage
7676
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # [email protected]
7777

7878
- if: ${{ matrix.python-version == '3.10' }}
7979
name: Build documentation
80-
run: sphinx-build ./docs/source ./docs/build --keep-going -n -a -b html
80+
run: |
81+
pipx install sphinx && pipx inject sphinx pyjwt cryptography sphinx-mdinclude sphinx-rtd-theme sphinx-autodoc-typehints && sphinx-build ./docs/source ./docs/build --keep-going -n -a -b html

.pre-commit-config.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
repos:
2-
- repo: https://github.com/PyCQA/flake8
2+
- repo: https://github.com/pycqa/flake8
33
rev: 6.0.0
44
hooks:
55
- id: flake8
66
- repo: https://github.com/asottile/pyupgrade
7-
rev: v3.3.1
7+
rev: v3.10.1
88
hooks:
99
- id: pyupgrade
1010
args: [--keep-runtime-typing]
11-
- repo: https://github.com/PyCQA/isort
11+
- repo: https://github.com/pycqa/isort
1212
rev: 5.12.0
1313
hooks:
1414
- id: isort
@@ -18,3 +18,10 @@ repos:
1818
hooks:
1919
- id: black
2020
additional_dependencies: ['click<8.1.0']
21+
- repo: https://github.com/python-poetry/poetry
22+
rev: 1.5.1
23+
hooks:
24+
- id: poetry-check
25+
- id: poetry-lock
26+
- id: poetry-export
27+
args: ["--dev", "-f", "requirements.txt", "-o", "requirements.txt"]

Pipfile

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

Pipfile.lock

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

auth0/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
__version__ = "4.4.0"
1+
# This value is updated by `poetry_dynamic_versioning` during build time from the latest git tag
2+
__version__ = "0.0.0"
23

34
from auth0.exceptions import Auth0Error, RateLimitError, TokenValidationError
45

docs/source/conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def find_version(*file_paths):
5959
"sphinx.ext.viewcode",
6060
"sphinx.ext.githubpages",
6161
"sphinx_mdinclude",
62+
"sphinx_autodoc_typehints",
6263
]
6364

6465
# Add any paths that contain templates here, relative to this directory.
@@ -95,4 +96,8 @@ def find_version(*file_paths):
9596
html_static_path = []
9697

9798
# Sphinx somehow can't find this one
98-
nitpick_ignore = [("py:class", "RSAPublicKey")]
99+
nitpick_ignore = [
100+
("py:class", "RSAPublicKey"),
101+
("py:data", "typing.Any"),
102+
("py:data", "typing.ClassVar"),
103+
]

0 commit comments

Comments
 (0)