File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Testing Pipeline
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+
11+ jobs :
12+ test :
13+ name : Lint, Format, and Test
14+ runs-on : ubuntu-latest
15+
16+ strategy :
17+ matrix :
18+ python-version : [3.11]
19+
20+ steps :
21+ # Step 1: Checkout the repository
22+ - name : Checkout Repository
23+ uses : actions/checkout@v3
24+
25+ # Step 2: Set up Python environment
26+ - name : Set up Python ${{ matrix.python-version }}
27+ uses : actions/setup-python@v4
28+ with :
29+ python-version : ${{ matrix.python-version }}
30+ cache : ' pip'
31+
32+ # Step 3: Install dependencies
33+ - name : Install Dependencies
34+ run : |
35+ pip install --upgrade pip
36+ pip install -r requirements.txt
37+ pip install .[test,lint]
38+
39+
40+ # Step 4: Lint with flake8
41+ - name : Lint
42+ run : |
43+ flake8 .
44+
45+ # Step 5: Check formatting with black
46+ - name : Check formatting
47+ run : |
48+ black --check .
49+
50+ # Step 6: Run tests
51+ - name : Run Tests with pytest
52+ run : |
53+ pytest --cov=.
You can’t perform that action at this time.
0 commit comments