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 name: FailCheck
on: on: [push, pull_request]
push:
branches: [ beta ]
pull_request:
branches: [ beta ]
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
max-parallel: 5
matrix:
python-version: [3.10]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Python 3.10 - name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: "3.10" python-version: ${{ matrix.python-version }}
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt-get install libpq-dev
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install flake8 pytest pip install -r requirements.txt
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi pip install flake8 flake8-print flake8-quotes
- name: Lint with flake8 - name: Check for showstoppers
run: | run: |
# stop the build if there are Python syntax errors or undefined names flake8 . --count --select=E999 --show-source --statistics
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics shellcheck:
# 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 runs-on: ubuntu-latest
- name: Test with pytest
run: | steps:
pytest - uses: actions/checkout@v2
- name: Check for install script errors
uses: ludeeus/action-shellcheck@0.1.0