File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed
Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+ name: Build and Test
5+
6+ on:
7+ workflow_dispatch:
8+ schedule:
9+ - cron: "0 2 * * 1-5"
10+ push:
11+ branches:
12+ - main
13+ - develop
14+ - release/*
15+ pull_request:
16+ branches:
17+ - main
18+ - develop
19+ jobs:
20+ build:
21+
22+ runs-on: ubuntu-latest
23+ strategy:
24+ fail-fast: false
25+ matrix:
26+ python-version: ["3.11"]
27+
28+ steps:
29+ - uses: actions/checkout@v2
30+ - name: Set up Python ${{ matrix.python-version }}
31+ uses: actions/setup-python@v2
32+ with:
33+ python-version: ${{ matrix.python-version }}
34+ - name: Install dependencies
35+ run: |
36+ python -m pip install --upgrade pip
37+ python -m pip install flake8 pytest
38+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
39+ - name: Lint with flake8
40+ run: |
41+ # stop the build if there are Python syntax errors or undefined names
42+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
43+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
44+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
45+ - name: Test with pytest
46+ run: |
47+ pytest
You can’t perform that action at this time.
0 commit comments