Skip to content
This repository was archived by the owner on Aug 19, 2022. It is now read-only.

Commit 70b254f

Browse files
author
Thiago C. D'Ávila
authored
Merge pull request #250 from staticdev/rdt-theme-and-nox-poetry
Enhances nox usage
2 parents ccc4853 + 1fd270f commit 70b254f

File tree

8 files changed

+177
-176
lines changed

8 files changed

+177
-176
lines changed

.github/workflows/constraints.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
pip==20.3.3
22
nox==2020.8.22
33
poetry==1.1.4
4-
virtualenv==20.2.2
4+
nox-poetry==0.5.0
5+
virtualenv==20.2.1

.github/workflows/dependabot.yml

-22
This file was deleted.

.github/workflows/tests.yml

+56-13
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,18 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
include:
15-
- { python-version: 3.8, os: ubuntu-latest, session: "pre-commit" }
16-
- { python-version: 3.8, os: ubuntu-latest, session: "safety" }
15+
- { python-version: 3.9, os: ubuntu-latest, session: "pre-commit" }
16+
- { python-version: 3.9, os: ubuntu-latest, session: "safety" }
17+
- { python-version: 3.9, os: ubuntu-latest, session: "mypy" }
1718
- { python-version: 3.8, os: ubuntu-latest, session: "mypy" }
1819
- { python-version: 3.7, os: ubuntu-latest, session: "mypy" }
20+
- { python-version: 3.9, os: ubuntu-latest, session: "tests" }
1921
- { python-version: 3.8, os: ubuntu-latest, session: "tests" }
2022
- { python-version: 3.7, os: ubuntu-latest, session: "tests" }
21-
- { python-version: 3.8, os: windows-latest, session: "tests" }
22-
- { python-version: 3.8, os: macos-latest, session: "tests" }
23-
# - { python-version: 3.8, os: ubuntu-latest, session: "typeguard" }
24-
- { python-version: 3.8, os: ubuntu-latest, session: "docs-build" }
23+
- { python-version: 3.9, os: windows-latest, session: "tests" }
24+
- { python-version: 3.9, os: macos-latest, session: "tests" }
25+
# - { python-version: 3.9, os: ubuntu-latest, session: "typeguard" }
26+
- { python-version: 3.9, os: ubuntu-latest, session: "docs-build" }
2527

2628
env:
2729
NOXSESSION: ${{ matrix.session }}
@@ -31,7 +33,7 @@ jobs:
3133
uses: actions/[email protected]
3234

3335
- name: Set up Python ${{ matrix.python-version }}
34-
uses: actions/setup-python@v2.2.1
36+
uses: actions/setup-python@v2.1.4
3537
with:
3638
python-version: ${{ matrix.python-version }}
3739

@@ -47,7 +49,7 @@ jobs:
4749
4850
- name: Install Nox
4951
run: |
50-
pip install --constraint=.github/workflows/constraints.txt nox
52+
pip install --constraint=.github/workflows/constraints.txt nox nox-poetry
5153
nox --version
5254
5355
- name: Compute pre-commit cache key
@@ -66,7 +68,7 @@ jobs:
6668
print("::set-output name=result::{}".format(result))
6769
6870
- name: Restore pre-commit cache
69-
uses: actions/cache@v2
71+
uses: actions/cache@v2.1.3
7072
if: matrix.session == 'pre-commit'
7173
with:
7274
path: ~/.cache/pre-commit
@@ -78,18 +80,59 @@ jobs:
7880
run: |
7981
nox --force-color --python=${{ matrix.python-version }}
8082
83+
- name: Upload coverage data
84+
if: always() && matrix.session == 'tests'
85+
uses: "actions/[email protected]"
86+
with:
87+
name: coverage-data
88+
path: ".coverage.*"
89+
8190
- name: Upload documentation
8291
if: matrix.session == 'docs-build'
83-
uses: actions/upload-artifact@v2
92+
uses: actions/upload-artifact@v2.2.1
8493
with:
8594
name: docs
8695
path: docs/_build
8796

97+
coverage:
98+
runs-on: ubuntu-latest
99+
needs: tests
100+
steps:
101+
- name: Check out the repository
102+
uses: actions/[email protected]
103+
104+
- name: Set up Python 3.9
105+
uses: actions/[email protected]
106+
with:
107+
python-version: 3.9
108+
109+
- name: Upgrade pip
110+
run: |
111+
pip install --constraint=.github/workflows/constraints.txt pip
112+
pip --version
113+
114+
- name: Install Poetry
115+
run: |
116+
pip install --constraint=.github/workflows/constraints.txt poetry
117+
poetry --version
118+
119+
- name: Install Nox
120+
run: |
121+
pip install --constraint=.github/workflows/constraints.txt nox nox-poetry
122+
nox --version
123+
124+
- name: Download coverage data
125+
uses: actions/[email protected]
126+
with:
127+
name: coverage-data
128+
129+
- name: Combine coverage data and display human readable report
130+
run: |
131+
nox --force-color --session=coverage
132+
88133
- name: Create coverage report
89-
if: always() && matrix.session == 'tests'
90134
run: |
91135
nox --force-color --session=coverage -- xml
92136
93137
- name: Upload coverage report
94-
if: always() && matrix.session == 'tests'
95-
uses: codecov/[email protected]
138+
uses: codecov/[email protected]

docs/conf.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
project = "Django Sorting Bootstrap"
66
author = "Thiago Carvalho D'Ávila"
77
copyright = f"{datetime.now().year}, {author}"
8-
extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon"]
8+
extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon", "sphinx_rtd_theme"]
99
autodoc_typehints = "description"
10+
html_theme = "sphinx_rtd_theme"

docs/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
sphinx==3.4.1
2+
sphinx-rtd-theme==0.5.0

0 commit comments

Comments
 (0)