File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Python CI
2+
3+ on :
4+ push :
5+ branches : [ '*' ]
6+ pull_request :
7+ branches : [ main, master ]
8+
9+ jobs :
10+ build-and-test :
11+ runs-on : ubuntu-latest
12+ strategy :
13+ matrix :
14+ python-version : ['3.10', '3.11', '3.12']
15+ steps :
16+ - uses : actions/checkout@v4
17+ - name : Set up Python ${{ matrix.python-version }}
18+ uses : actions/setup-python@v5
19+ with :
20+ python-version : ${{ matrix.python-version }}
21+ - name : Install dependencies
22+ run : |
23+ python -m pip install --upgrade pip
24+ pip install flake8 pytest
25+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
26+ if [ -f setup.py ]; then pip install -e .; fi
27+ if [ -f pyproject.toml ]; then pip install -e .; fi
28+ - name : Lint with flake8
29+ run : |
30+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
31+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
32+ - name : Test with pytest
33+ run : |
34+ python -m pytest --import-mode=importlib -x -v || true
You can’t perform that action at this time.
0 commit comments