Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:staticdev/django-pagination-boots…
Browse files Browse the repository at this point in the history
…trap
  • Loading branch information
staticdev committed Dec 28, 2020
2 parents 9a7b1ab + cbac2be commit 774674f
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 33 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pip==20.2.4
pip==20.3.3
nox==2020.8.22
poetry==1.1.2
virtualenv==20.2.1
nox-poetry==0.5.0
poetry==1.1.4
virtualenv==20.1.0
22 changes: 0 additions & 22 deletions .github/workflows/dependabot.yml

This file was deleted.

54 changes: 47 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ jobs:
- { python-version: 3.8, os: ubuntu-latest, session: "safety" }
- { python-version: 3.8, os: ubuntu-latest, session: "mypy" }
- { python-version: 3.7, os: ubuntu-latest, session: "mypy" }
- { python-version: 3.6, os: ubuntu-latest, session: "mypy" }
- { python-version: 3.8, os: ubuntu-latest, session: "tests" }
- { python-version: 3.7, os: ubuntu-latest, session: "tests" }
- { python-version: 3.6, os: ubuntu-latest, session: "tests" }
- { python-version: 3.8, os: windows-latest, session: "tests" }
- { python-version: 3.8, os: macos-latest, session: "tests" }
# - { python-version: 3.8, os: ubuntu-latest, session: "typeguard" }
- { python-version: 3.8, os: ubuntu-latest, session: "xdoctest" }
- { python-version: 3.8, os: ubuntu-latest, session: "docs-build" }

env:
Expand All @@ -49,7 +48,7 @@ jobs:
- name: Install Nox
run: |
pip install --constraint=.github/workflows/constraints.txt nox
pip install --constraint=.github/workflows/constraints.txt nox nox-poetry
nox --version
- name: Compute pre-commit cache key
Expand All @@ -68,7 +67,7 @@ jobs:
print("::set-output name=result::{}".format(result))
- name: Restore pre-commit cache
uses: actions/cache@v2
uses: actions/cache@v2.1.3
if: matrix.session == 'pre-commit'
with:
path: ~/.cache/pre-commit
Expand All @@ -80,18 +79,59 @@ jobs:
run: |
nox --force-color --python=${{ matrix.python-version }}
- name: Upload coverage data
if: always() && matrix.session == 'tests'
uses: "actions/upload-artifact@v2.2.1"
with:
name: coverage-data
path: ".coverage.*"

- name: Upload documentation
if: matrix.session == 'docs-build'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v2.2.1
with:
name: docs
path: docs/_build

coverage:
runs-on: ubuntu-latest
needs: tests
steps:
- name: Check out the repository
uses: actions/checkout@v2.3.4

- name: Set up Python 3.8
uses: actions/setup-python@v2.2.1
with:
python-version: 3.8

- name: Upgrade pip
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip --version
- name: Install Poetry
run: |
pip install --constraint=.github/workflows/constraints.txt poetry
poetry --version
- name: Install Nox
run: |
pip install --constraint=.github/workflows/constraints.txt nox nox-poetry
nox --version
- name: Download coverage data
uses: actions/download-artifact@v2.0.7
with:
name: coverage-data

- name: Combine coverage data and display human readable report
run: |
nox --force-color --session=coverage
- name: Create coverage report
if: always() && matrix.session == 'tests'
run: |
nox --force-color --session=coverage -- xml
- name: Upload coverage report
if: always() && matrix.session == 'tests'
uses: codecov/codecov-action@v1.1.1
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def precommit(session: Session) -> None:
@nox.session(python="3.8")
def safety(session: Session) -> None:
"""Scan dependencies for insecure packages."""
requirements = nox_poetry.export_requirements(session, dev=True)
requirements = nox_poetry.export_requirements(session)
session.install("safety")
session.run("safety", "check", f"--file={requirements}", "--bare")

Expand Down

0 comments on commit 774674f

Please sign in to comment.