Skip to content

restrict max python version #59

restrict max python version

restrict max python version #59

Workflow file for this run

name: Python application
on: [push]
jobs:
build_backend:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- 3.9
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache pipenv virtualenv
id: cache-pipenv
uses: actions/cache@v2
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-pipenv-${{ matrix.python-version }}-${{ hashFiles('**/Pipfile.lock') }}-2
- name: Install pipenv
run: |
python -m pip install --upgrade pipenv
- name: Preinstall
run: |
pipenv run pip install cython numpy
sudo apt install libopenblas-dev libgdal-dev libproj-dev
- name: Install dependencies
if: steps.cache-pipenv.outputs.cache-hit != 'true'
run: |
pipenv sync --dev
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run mypy
run: |
pipenv run mypy .
- name: Test with pytest
run: |
pipenv run pytest -vv
env:
CLOUDAMQP_URL: "https://hello"
TMDB_API_KEY: word
- name: Import saau
run: |
pipenv run python -c "import saau; print(saau)"
- name: Run saau
run: pipenv run python -m saau
# - name: Archive test report
# uses: actions/upload-artifact@v1
# if: always()
# with:
# name: report.html
# path: report.html
# run_saau:
# if: never()
# runs-on: ubuntu-latest
# needs: build_backend
# steps:
# - name: Download saau
# uses: actions/download-artifact@v1
# with:
# name: saau.whl
# - name: Run saau
# run: |
# pipenv run python -m saau