File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed
Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ # Trigger the workflow on push events for the main branch and on pull requests
4+ on :
5+ push :
6+ branches : [ main ]
7+ pull_request :
8+ branches : [ main ]
9+
10+ jobs :
11+ build-and-test :
12+ runs-on : ubuntu-latest
13+ strategy :
14+ matrix :
15+ python-version :
16+ - " 3.10"
17+ - " 3.11"
18+ - " 3.12"
19+ - " 3.13"
20+
21+ steps :
22+ - name : Checkout Repository
23+ uses : actions/checkout@v4
24+
25+ - name : Set up Python ${{ matrix.python-version }}
26+ uses : actions/setup-python@v5
27+ with :
28+ python-version : ${{ matrix.python-version }}
29+ cache : " uv"
30+
31+ - name : Install uv
32+ run : pip install uv --index-url https://pypi.org/simple/
33+
34+ - name : Install Dependencies with uv
35+ run : |
36+ uv pip install -r requirements.txt
37+ uv pip install -r requirements-dev.txt # Assuming a dev requirements file for testing/linting
38+
39+ - name : Lint with Ruff
40+ run : |
41+ uv run --tool ruff check . --fix # Use uv run to ensure Ruff is activated in its environment
42+
43+ - name : Format with Ruff
44+ run : |
45+ uv run --tool ruff format . --fix # Use uv run to ensure Ruff is activated in its environment
46+
47+ - name : Test with Pytest
48+ run : |
49+ uv run --tool pytest # Use uv run to ensure Pytest is activated in its environment
50+
51+ # Example for Code Coverage - requires setup for tools like Codecov or Coveralls
52+ # - name: Upload Coverage to Codecov
53+ # uses: codecov/codecov-action@v4
54+ # with:
55+ # token: ${{ secrets.CODECOV_TOKEN }}
56+ # file: ./coverage.xml
57+ # fail_ci_if_error: true
You can’t perform that action at this time.
0 commit comments