Skip to content

Refactor and sqlite plugin #103

Refactor and sqlite plugin

Refactor and sqlite plugin #103

Workflow file for this run

name: Python unit tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Cache pip packages
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install pip-tools
run: |
python -m pip install --upgrade pip
pip install pip-tools
- name: Compile requirements
run: |
if [ -f podcastTextGenerationApp/requirements.in ]; then pip-compile podcastTextGenerationApp/requirements.in; fi
- name: Install dependencies
run: |
if [ -f podcastTextGenerationApp/requirements.txt ]; then pip install -r podcastTextGenerationApp/requirements.txt; fi
- name: Set PYTHONPATH and run tests
run: |
export PYTHONPATH=${PYTHONPATH}:$(pwd)/podcastTextGenerationApp
echo "PYTHONPATH=$PYTHONPATH:$(pwd)/podcastTextGenerationApp" >> $GITHUB_ENV
- name: Analysing the code with pylint
run: |
pylint --fail-under=7.5 $(git ls-files '*.py')
- name: Run Tests
run : |
python -m unittest