Skip to content

Commit

Permalink
Make GitHub Actions use Pipenv for installing deps
Browse files Browse the repository at this point in the history
For:
#28
  • Loading branch information
liammulh committed May 15, 2024
1 parent 927c22b commit 08bc778
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 70 deletions.
17 changes: 0 additions & 17 deletions .github/READTHIS.md

This file was deleted.

12 changes: 7 additions & 5 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: install Pipenv
run: pip install pipenv --user
- name: install dependencies
run: pip install -r requirements.txt
run: pipenv sync --dev # Installs all deps, including dev deps, from Pipfile.lock.
- name: Format
run: invoke fmt
run: pipenv run invoke fmt
- name: lint
run: invoke lint
run: pipenv run invoke lint
- name: check types
run: invoke types
run: pipenv run invoke types
- name: run tests
run: invoke test
run: pipenv run invoke test
28 changes: 0 additions & 28 deletions requirements.txt

This file was deleted.

20 changes: 0 additions & 20 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,26 +58,6 @@ def check(c):
"""Run all code checks."""


@task
def reqs(c):
"""Generate requirements.txt file.
The GitHub Actions workflow runners don't seem to play nicely with
Pipenv. We generate a requirements.txt file and use it to install
dependencies in GitHub Actions.
We also use the requirements.txt file on Elastic Beanstalk.
"""
add_warning = (
"echo '# Do not edit directly. This file is generated.\n' > requirements.txt"
)
# The PIPENV_VERBOSITY variable suppresses a warning issued Pipenv
# if you use the run command when you've already activated the
# virtual environment.
add_reqs = "PIPENV_VERBOSITY=-1 pipenv run pip freeze >> requirements.txt"
c.run(f"{add_warning} && {add_reqs}")


@task
def dev(c):
"""Run the development server.
Expand Down

0 comments on commit 08bc778

Please sign in to comment.