Skip to content

raise in Dependencies with yield and except (#19) #664

raise in Dependencies with yield and except (#19)

raise in Dependencies with yield and except (#19) #664

Workflow file for this run

# 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: Python app CI
env:
COLUMNS: 120
on:
push:
branches: [ main ]
# pull_request:
# branches: [ main ]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-22.04
env:
DB_USERNAME : ${{ secrets.DB_USERNAME }}
DB_PASSWORD : ${{ secrets.DB_PASSWORD }}
DB_HOST : ${{ secrets.DB_HOST }}
DB_PORT : ${{ secrets.DB_PORT }}
DB_DATABASE : ${{ secrets.DB_DATABASE }}
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION : ${{ secrets.AWS_DEFAULT_REGION }}
AWS_S3_BUCKET : ${{ secrets.AWS_S3_BUCKET }}
AWS_S3_DEFAULT_REGION : ${{ secrets.AWS_S3_DEFAULT_REGION }}
AWS_S3_ACCESS_KEY_ID : ${{ secrets.AWS_S3_ACCESS_KEY_ID }}
AWS_S3_SECRET_ACCESS_KEY : ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with ruff
run: |
# stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
ruff . --select=E9,F63,F7,F82 --show-source
# 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
ruff . --exit-zero --statistics
- name: Test with pytest
run: |
# calling via python will also add the current directory to sys.path
if [ -d tests ] || [ -d test ]; then python -m pytest -s; fi
# env:
# DB_USERNAME : ${{ secrets.DB_USERNAME }}
# DB_PASSWORD : ${{ secrets.DB_PASSWORD }}
# DB_HOST : ${{ secrets.DB_HOST }}
# DB_PORT : ${{ secrets.DB_PORT }}
# DB_DATABASE : ${{ secrets.DB_DATABASE }}