Skip to content

Commit

Permalink
Use venv in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
brunomichetti committed Aug 9, 2024
1 parent 49eb87b commit b432cf1
Show file tree
Hide file tree
Showing 3 changed files with 138 additions and 92 deletions.
106 changes: 56 additions & 50 deletions .github/workflows/drip-django.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ jobs:
strategy:
matrix:
include:
# python 3.4
- python-version: "3.5"
django-version: "2.2"
# # python 3.5
# - python-version: "3.5"
# django-version: "2.2"
# python 3.6
- python-version: "3.6"
django-version: "2.2"
- python-version: "3.6"
django-version: "3.2"
# - python-version: "3.6"
# django-version: "2.2"
# - python-version: "3.6"
# django-version: "3.2"
# python 3.7
- python-version: "3.7"
django-version: "2.2"
- python-version: "3.7"
django-version: "3.2"
# - python-version: "3.7"
# django-version: "2.2"
# - python-version: "3.7"
# django-version: "3.2"
# python 3.8
- python-version: "3.8"
django-version: "2.2"
Expand Down Expand Up @@ -61,16 +61,16 @@ jobs:
django-version: "4.2"
- python-version: "3.12"
django-version: "5.2"
# pypy3
- python-version: "pypy3"
django-version: "2.2"
- python-version: "pypy3"
django-version: "3.2"
- python-version: "pypy3"
django-version: "4.2"
- python-version: "pypy3"
django-version: "5.2"
runs-on: ubuntu-latest
# # pypy3
# - python-version: "pypy3"
# django-version: "2.2"
# - python-version: "pypy3"
# django-version: "3.2"
# - python-version: "pypy3"
# django-version: "4.2"
# - python-version: "pypy3"
# django-version: "5.2"
runs-on: ubuntu-20.04
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}

Expand All @@ -83,34 +83,40 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Installing resources
run: pip install --upgrade pip

- name: Installing and entering to virtualenv
run: |
pip install --upgrade pip==20.0.2
pip install pipenv
- name: Installing requirements pipenv
run: |
pipenv install --dev
- name: Installing Django version ${{ matrix.django-version }}
run: |
pip install Django==${{ matrix.django-version }}
- name: Checking PEP8 code style
run: |
pipenv run flake8 --count
- name: Checking Black code formatter
run: |
pipenv run black . --check
- name: Check typing
run: |
pipenv run mypy --namespace-packages --explicit-package-bases --ignore-missing-imports --no-warn-unused-ignores .
- name: Running tests
run: |
pipenv run coverage run -m pytest --ds=testsettings
- name: Checking coverage
run: |
pipenv run coverage report --fail-under=90 -m
pipenv run coverage xml
- name: Setup Code Climate test-reporter
pip install virtualenv
python -m venv venv
source venv/bin/activate
- name: Installing Requirements
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
./cc-test-reporter after-build --coverage-input-type coverage.py --exit-code $?
pip install django==${{ matrix.django-version }}
pip install pytest==7.1.1
pytest .
# - name: Checking PEP8 code style
# run: flake8 .

# - name: Checking Black code formatter
# run: black . --check

# - name: Check typing
# run: mypy --namespace-packages --explicit-package-bases --ignore-missing-imports --no-warn-unused-ignores .

# - name: Running tests
# run: coverage run -m pytest . --ds=testsettings

# - name: Checking coverage
# run: |
# coverage report --fail-under=90 -m
# coverage xml

# - name: Setup Code Climate test-reporter
# run: |
# curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
# chmod +x ./cc-test-reporter
# ./cc-test-reporter before-build
# ./cc-test-reporter after-build --coverage-input-type coverage.py --exit-code $?
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ __pycache__

#pyenv
.python-version

# virtualenv
venv/
121 changes: 79 additions & 42 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,83 +1,120 @@
alabaster==0.7.12
alabaster==0.7.13
amqp==5.2.0
appnope==0.1.2
APScheduler==3.7.0
asgiref==3.5.2
asgiref==3.8.1
astroid==2.5.1
asttokens==2.4.1
attrs==24.2.0
autopep8==1.5.6
Babel==2.10.1
babel==2.16.0
backcall==0.2.0
backports.zoneinfo==0.2.1
billiard==3.6.4.0
black==22.3.0
bleach==3.3.0
certifi==2020.12.5
chardet==4.0.0
colorama==0.4.4
celery==5.2.2
certifi==2024.7.4
cfgv==3.4.0
charset-normalizer==3.3.2
click==8.1.7
click-didyoumean==0.3.1
click-plugins==1.1.1
click-repl==0.3.0
colorama==0.4.6
coverage==5.5
decorator==4.4.2
Django==3.2.15
distlib==0.3.8
Django==3.2.25
django-stubs==1.9.0
django-stubs-ext==5.0.4
docutils==0.16
executing==2.0.1
factory-boy==3.2.1
Faker==26.3.0
filelock==3.15.4
flake8==4.0.1
flake8-isort==4.1.1
idna==2.10
imagesize==1.2.0
identify==2.6.0
idna==3.7
imagesize==1.4.1
importlib-metadata==3.7.3
iniconfig==2.0.0
ipdb==0.13.7
ipython==8.4.0
ipython-genutils==0.2.0
isort==5.7.0
jaraco.classes==3.4.0
jedi==0.18.0
Jinja2==2.11.3
keyring==23.0.0
keyring==23.9.3
kombu==5.4.0
lazy-object-proxy==1.5.2
mypy==0.942
MarkupSafe==1.1.1
matplotlib-inline==0.1.7
mccabe==0.6.1
packaging==20.9
more-itertools==10.4.0
mypy==0.942
mypy-extensions==1.0.0
nh3==0.2.18
nodeenv==1.9.1
packaging==24.1
parso==0.8.1
pathspec==0.12.1
pexpect==4.8.0
pickleshare==0.7.5
pkginfo==1.7.0
prompt-toolkit==3.0.17
pkginfo==1.11.1
platformdirs==4.2.2
pluggy==1.5.0
pre-commit==2.18.1
prompt_toolkit==3.0.47
ptyprocess==0.7.0
pure_eval==0.2.3
py==1.11.0
pycodestyle==2.8.0
pyflakes==2.4.0
pre-commit==2.18.1
Pygments==2.8.1
pylint==2.7.2
pyparsing==2.4.7
python-dateutil==2.8.1
pytz==2021.1
readme-renderer==29.0
requests==2.25.1
requests-toolbelt==0.9.1
rfc3986==1.4.0
six==1.15.0
snowballstemmer==2.1.0
pytest==7.1.1
pytest-celery==0.0.0
pytest-django==4.5.2
pytest-sugar==0.9.4
python-dateutil==2.9.0.post0
pytz==2024.1
PyYAML==6.0.2
readme_renderer==43.0
requests==2.32.3
requests-toolbelt==1.0.0
rfc3986==2.0.0
six==1.16.0
snowballstemmer==2.2.0
Sphinx==3.5.2
sphinx-rtd-theme==0.5.1
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-applehelp==1.0.4
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-django==0.5.1
sphinxcontrib-htmlhelp==1.0.3
sphinxcontrib-htmlhelp==2.0.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.4
sqlparse==0.4.2
text-unidecode==1.3
sphinxcontrib-serializinghtml==1.1.5
sqlparse==0.5.1
stack-data==0.6.3
termcolor==2.4.0
testfixtures==6.18.5
toml==0.10.2
tqdm==4.59.0
tomli==2.0.1
tqdm==4.66.5
traitlets==5.0.5
twine==3.4.1
typed-ast==1.4.2
typed_ast==1.4.2
types-pytz==2024.1.0.20240417
types-PyYAML==6.0.12.20240808
types-six==1.16.16
typing_extensions==4.12.2
tzdata==2024.1
tzlocal==2.1
urllib3==1.26.9
wcwidth==0.2.5
webencodings==0.5.1
urllib3==2.2.2
vine==5.1.0
virtualenv==20.26.3
wcwidth==0.2.13
wrapt==1.12.1
zipp==3.4.1
types-six==1.16.16
pytest==7.1.1
pytest-sugar==0.9.4
pytest-django==4.5.2
factory-boy==3.2.1
celery==5.2.2
pytest-celery==0.0.0

0 comments on commit b432cf1

Please sign in to comment.