Skip to content

update pipelines

update pipelines #3113

Workflow file for this run

name: Python application
on: [push]
jobs:
build_backend:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- 3.8
- 3.9
# - 3.10-dev
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
if: "!endsWith(matrix.python-version, '-dev')"
with:
python-version: ${{ matrix.python-version }}
- uses: deadsnakes/action@v1.0.0
if: endsWith(matrix.python-version, '-dev')
with:
python-version: ${{ matrix.python-version }}
- name: Install dev dependencies
if: endsWith(matrix.python-version, '-dev')
run: |
sudo apt install libxml2-dev libxslt-dev
- 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: 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 rarbg_local
- name: Test with pytest
run: |
pipenv run pytest -vv
env:
CLOUDAMQP_URL: "https://hello"
TMDB_API_KEY: word
- name: Archive test report
uses: actions/upload-artifact@v1
if: always()
with:
name: report.html
path: report.html