Curie-Web/.github/workflows/test-database.yaml

30 lines
905 B
YAML
Raw Normal View History

2020-07-07 06:27:21 +01:00
name: Test Database
2020-07-06 14:35:37 +01:00
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
2020-07-06 14:40:00 +01:00
pip install flake8 mysql-connector mysql
2020-07-06 14:35:37 +01:00
- name: Lint script with flake8
run: |
2020-07-07 07:11:42 +01:00
flake8 ./tests/dbTestFiller.py --count --select=E9,F63,F7,F82 --show-source --statistics
2020-07-06 14:35:37 +01:00
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
2020-07-07 07:11:42 +01:00
flake8 ./tests/dbTestFiller.py --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
2020-07-06 14:35:37 +01:00
- name: Run Database-Filler script
2020-07-07 07:11:42 +01:00
run: cd tests && python dbTestFiller.py