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+ # This workflow will install Python dependencies, run tests and lint with a single version of Python
2+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+ name : CI/CD test
5+
6+ on :
7+ push :
8+ branches :
9+ - master
10+ - main
11+ pull_request :
12+ branches :
13+ - master
14+ - main
15+
16+ env :
17+ PYTHON_VERSION : 3.12.4
18+
19+ jobs :
20+ build :
21+
22+ runs-on : ubuntu-latest
23+
24+ steps :
25+ - name : Checkout code
26+ uses : actions/checkout@v4
27+
28+ - name : Set up Python ${{ env.PYTHON_VERSION }}
29+ uses : actions/setup-python@v5
30+ with :
31+ python-version : ${{ env.PYTHON_VERSION }}
32+
33+ - name : Caches pip
34+ uses : actions/cache@v4
35+ with :
36+ path : ~/.cache/pip
37+ key : ${{ runner.os }}-pip-py-${{ env.PYTHON_VERSION }}
38+
39+ - name : Install dependencies
40+ run : |
41+ pip install -r requirements.txt
42+ pip install -r dev-requirements.txt
43+
44+ - name : Lint code
45+ run : ruff check
46+
47+ - name : Run tests
48+ run : pytest test
Original file line number Diff line number Diff line change 1+ [tool .ruff ]
2+ line-length = 120
3+ target-version = " py312"
4+
You can’t perform that action at this time.
0 commit comments