default github update
This commit is contained in:
levina 2022-01-31 15:52:15 +07:00 committed by GitHub
parent ed78bfc594
commit 5f850666be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,36 +1,36 @@
name: FailCheck # 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
on: [push, pull_request] name: Python application
on:
push:
branches: [ $default-branch ]
pull_request:
branches: [ $default-branch ]
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@v1 - uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python 3.10
uses: actions/setup-python@v1 uses: actions/setup-python@v2
with: with:
python-version: ${{ matrix.python-version }} python-version: "3.10"
- 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 -r requirements.txt pip install flake8 pytest
pip install flake8 flake8-print flake8-quotes if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Check for showstoppers - name: Lint with flake8
run: | run: |
flake8 . --count --select=E999 --show-source --statistics # stop the build if there are Python syntax errors or undefined names
shellcheck: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
runs-on: ubuntu-latest flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
steps: run: |
- uses: actions/checkout@v1 pytest
- name: Check for install script errors
uses: ludeeus/action-shellcheck@0.1.0