-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #315 from UW-GAC/maint/pip-tools
Switch to using pip-tools for package version requirements
- Loading branch information
Showing
11 changed files
with
683 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,8 +32,8 @@ jobs: | |
python-version: 3.9 | ||
cache: pip | ||
cache-dependency-path: | | ||
requirements/base.txt | ||
requirements/local.txt | ||
requirements/requirements.txt | ||
requirements/test-requirements.txt | ||
# Run all pre-commit hooks on all the files. | ||
# Getting only staged files can be tricky in case a new PR is opened | ||
|
@@ -75,29 +75,30 @@ jobs: | |
python-version: ${{ matrix.python-version }} | ||
cache: pip | ||
cache-dependency-path: | | ||
requirements/base.txt | ||
requirements/local.txt | ||
requirements/requirements.txt | ||
requirements/test-requirements.txt | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements/local.txt | ||
pip install pip-tools | ||
pip-sync requirements/requirements.txt requirements/test-requirements.txt | ||
- name: Run tests | ||
run: coverage run -p -m pytest | ||
env: | ||
# We can set this to an empty string, since we'll never make an API call. | ||
ANVIL_API_SERVICE_ACCOUNT_FILE: foo | ||
|
||
- name: Upload coverage data | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage-data | ||
path: .coverage.* | ||
|
||
pytest-sqlite: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Code Repository | ||
uses: actions/[email protected] | ||
|
@@ -108,26 +109,27 @@ jobs: | |
python-version: 3.8 | ||
cache: pip | ||
cache-dependency-path: | | ||
requirements/base.txt | ||
requirements/local.txt | ||
requirements/requirements.txt | ||
requirements/test-requirements.txt | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements/local.txt | ||
pip install pip-tools | ||
pip-sync requirements/requirements.txt requirements/test-requirements.txt | ||
- name: Run tests | ||
run: coverage run -p -m pytest | ||
env: | ||
# We can set this to an empty string, since we'll never make an API call. | ||
ANVIL_API_SERVICE_ACCOUNT_FILE: foo | ||
|
||
- name: Upload coverage data | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage-data | ||
path: .coverage.* | ||
|
||
coverage: | ||
needs: | ||
- pytest-mariadb | ||
|
@@ -159,4 +161,3 @@ jobs: | |
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
-c requirements.txt | ||
-c test-requirements.txt | ||
|
||
Werkzeug # https://github.com/pallets/werkzeug | ||
ipdb # https://github.com/gotcha/ipdb | ||
|
||
# Testing | ||
# ------------------------------------------------------------------------------ | ||
mypy # https://github.com/python/mypy | ||
django-stubs # https://github.com/typeddjango/django-stubs | ||
|
||
# Documentation | ||
# ------------------------------------------------------------------------------ | ||
# 7.2 drops support for Python 3.8 | ||
sphinx # https://github.com/sphinx-doc/sphinx | ||
sphinx-autobuild # https://github.com/GaretJax/sphinx-autobuild | ||
|
||
# Code quality | ||
# ------------------------------------------------------------------------------ | ||
flake8 # https://github.com/PyCQA/flake8 | ||
flake8-isort # https://github.com/gforcada/flake8-isort | ||
black # https://github.com/psf/black | ||
pylint-django # https://github.com/PyCQA/pylint-django | ||
pre-commit # https://github.com/pre-commit/pre-commit | ||
|
||
# Security | ||
# ------------------------------------------------------------------------------ | ||
safety # https://github.com/pyupio/safety | ||
|
||
django-debug-toolbar # https://github.com/jazzband/django-debug-toolbar |
Oops, something went wrong.