Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👷 Add Python venv cache #1216

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,25 @@ jobs:
- uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"

- uses: actions/[email protected]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for asking for such a specific version?

id: cache-requirements
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'setup.py') }}

- name: "Install dependencies"
run: "scripts/install"
if: steps.cache-requirements.outputs.cache-hit != 'true'

- name: "Run linting checks"
run: "scripts/check"

- name: "Build package & docs"
run: "scripts/build"

- name: "Run tests"
run: "scripts/test"

- name: "Enforce coverage"
run: "scripts/coverage"
42 changes: 18 additions & 24 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
# Optionals
graphene; python_version<'3.10'
itsdangerous
jinja2
python-multipart
pyyaml
requests
-e .[full]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really want to do [full]? These dependencies then won't be pinned and so will only be updated implicitly when the cache is invalidated.


# Testing
autoflake
autoflake==1.4
black==20.8b1
coverage>=5.3
databases[sqlite]
flake8
isort==5.*
mypy
types-requests
types-contextvars
types-PyYAML
types-dataclasses
pytest
trio
coverage==5.3
databases[sqlite]==0.4.3
flake8==3.9.2
isort==5.9.1
mypy==0.910
types-requests==2.25.0
types-contextvars==0.1.4
types-PyYAML==5.4.3
types-dataclasses==0.1.5
pytest==6.2.4
trio==0.19.0

# Documentation
mkdocs
mkdocs-material
mkautodoc
mkdocs==1.2.1
mkdocs-material==7.1.9
mkautodoc==0.1.0

# Packaging
twine
wheel
twine==3.4.1
wheel==0.36.2
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os
import re

from setuptools import setup, find_packages
from setuptools import find_packages, setup


def get_version(package):
Expand Down