Skip to content

Merge pull request #72 from underdarknl/dynamic-hash #123

Merge pull request #72 from underdarknl/dynamic-hash

Merge pull request #72 from underdarknl/dynamic-hash #123

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 application
on:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:latest
env:
MYSQL_DATABASE: uweb_test
MYSQL_USER: stef
MYSQL_PASSWORD: password
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=B,C,E,F,W,T4,B9 --show-source --statistics --ignore=E203,E266,E501,W503,F403,F401,W605,F811,E712,E731
flake8 . --count --exit-zero --max-line-length=79 --statistics
- name: Run uweb3 unittests
run: |
python3 -m unittest discover test/test_model
python3 -m unittest test.test_request
python3 -m unittest test.test_templateparser