This commit is contained in:
levina 2022-01-31 16:03:26 +07:00 committed by GitHub
parent 3e2fd8a8af
commit 1336c4fc59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,36 +1,36 @@
# 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: FailCheck
on:
push:
branches: [ beta ]
pull_request:
branches: [ beta ]
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
matrix:
python-version: [3.10]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: "3.10"
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get install libpq-dev
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
pip install -r requirements.txt
pip install flake8 flake8-print flake8-quotes
- name: Check for showstoppers
run: |
# 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: Test with pytest
run: |
pytest
flake8 . --count --select=E999 --show-source --statistics
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check for install script errors
uses: ludeeus/action-shellcheck@0.1.0