From db996fbb0c9e0005e54db3c74120e0244935d8be Mon Sep 17 00:00:00 2001 From: mzfr Date: Sat, 11 Jul 2020 12:27:05 +0530 Subject: [PATCH] Change python version to 3.7 Also cache the requirements. And run tests before making the .egg file. --- .github/workflows/deploy.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c219a519..69760cc9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,15 +11,30 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up Python 3.6 + - name: Set up Python 3.7 uses: actions/setup-python@v2 with: - python-version: 3.6 + python-version: 3.7 + + - name: cache pip + - uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + ${{ runner.os }}- + - name: Install dependencies run: | python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - + + - name: Test with Pytest + run: | + pip install pytest pytest-cov + py.test + - name: Generate .egg run: python setup.py bdist_egg