File tree Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Lint
2+
3+ on :
4+ pull_request :
5+ branches : [ "master" ]
6+
7+ jobs :
8+ lint :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v3
12+ - uses : psf/black@stable
Original file line number Diff line number Diff line change 1+ # This workflow will install Python dependencies, run tests and lint with a single version of Python
2+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+ name : Python application
5+
6+ on :
7+ push :
8+ branches : [ "master" ]
9+ pull_request :
10+ branches : [ "master" ]
11+
12+ permissions :
13+ contents : read
14+
15+ jobs :
16+ build :
17+ runs-on : ubuntu-latest
18+ strategy :
19+ matrix :
20+ # Include all supported version of Python here.
21+ python-version : ["3.11"]
22+
23+ steps :
24+ - uses : actions/checkout@v3
25+ - name : Set up Python ${{ matrix.python-version }}
26+ uses : actions/setup-python@v3
27+ with :
28+ python-version : ${{ matrix.python-version }}
29+ cache : ' pip' # caching pip dependencies
30+ cache-dependency-path : ' **/pyproject.toml'
31+ - name : Install dependencies
32+ run : |
33+ python -m pip install --upgrade pip
34+ pip install ruff pytest
35+ pip install -e .
36+ - name : Lint with ruff
37+ run : |
38+ # stop the build if there are Python syntax errors or undefined names
39+ ruff check .
40+ - name : Run tests
41+ run : python -m pytest tests
You can’t perform that action at this time.
0 commit comments