Skip to content

Commit

Permalink
fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jefer94 committed Aug 10, 2023
1 parent 3018a2d commit 28ce846
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Dependencies
name: Checks

on:
push: {}
pull_request: {}

env:
PYTHON_VERSION: 3.11.4
WORKON_HOME: /home/runner/.virtualenv

# setup_dependencies > migrations & dependencies > tests > pages & linter & dockerhub

Expand All @@ -27,18 +28,18 @@ jobs:
PYTHONUNBUFFERED=1
pipenv install --dev
- name: Determine pipenv site-packages directory
run: echo "SITE_PACKAGES_DIR=$(pipenv --venv)/lib/python$(python --version | cut -d ' ' -f 2 | cut -d '.' -f 1-2)/site-packages" >> $GITHUB_ENV
# - name: Determine pipenv site-packages directory
# run: echo "SITE_PACKAGES_DIR=$(pipenv --venv)/lib/python$(python --version | cut -d ' ' -f 2 | cut -d '.' -f 1-2)/site-packages" >> $GITHUB_ENV

- name: Upload Python packages as artifact
uses: actions/upload-artifact@v3
with:
name: python-packages
path: ${{ env.SITE_PACKAGES_DIR }}
path: ${{ env.WORKON_HOME }}

- name:
run: |
echo ${{ env.SITE_PACKAGES_DIR }}
# - name:
# run: |
# echo ${{ env.SITE_PACKAGES_DIR }}

migrations:
needs: setup_dependencies
Expand All @@ -58,14 +59,14 @@ jobs:

# This is where you'll restore the site-packages.
# For clarity, we'll define the path to site-packages again (though it's the same as before).
- name: Define site-packages directory
run: echo "SITE_PACKAGES_DIR=$(pipenv --venv)/lib/python$(python --version | cut -d ' ' -f 2 | cut -d '.' -f 1-2)/site-packages" >> $GITHUB_ENV
# - name: Define site-packages directory
# run: echo "SITE_PACKAGES_DIR=$(pipenv --venv)/lib/python$(python --version | cut -d ' ' -f 2 | cut -d '.' -f 1-2)/site-packages" >> $GITHUB_ENV

- name: Download Python packages artifact
uses: actions/download-artifact@v3
with:
name: python-packages
path: ${{ env.SITE_PACKAGES_DIR }}
path: ${{ env.WORKON_HOME }}

- name: Check migrations
run: |
Expand Down Expand Up @@ -93,14 +94,14 @@ jobs:

# This is where you'll restore the site-packages.
# For clarity, we'll define the path to site-packages again (though it's the same as before).
- name: Define site-packages directory
run: echo "SITE_PACKAGES_DIR=$(pipenv --venv)/lib/python$(python --version | cut -d ' ' -f 2 | cut -d '.' -f 1-2)/site-packages" >> $GITHUB_ENV
# - name: Define site-packages directory
# run: echo "SITE_PACKAGES_DIR=$(pipenv --venv)/lib/python$(python --version | cut -d ' ' -f 2 | cut -d '.' -f 1-2)/site-packages" >> $GITHUB_ENV

- name: Download Python packages artifact
uses: actions/download-artifact@v3
with:
name: python-packages
path: ${{ env.SITE_PACKAGES_DIR }}
path: ${{ env.WORKON_HOME }}

- name: Calculate updated MD5 for Pipfile.lock
id: calculate-md5-2
Expand Down

0 comments on commit 28ce846

Please sign in to comment.