File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Test
2+
3+ on :
4+ push :
5+ branches : [ main, develop ]
6+ pull_request :
7+ branches : [ main, develop ]
8+
9+ env :
10+ # enable colored output
11+ PY_COLORS : 1
12+
13+ permissions :
14+ contents : read
15+
16+ jobs :
17+ test :
18+ runs-on : ubuntu-latest
19+ strategy :
20+ matrix :
21+ python-version : ["3.10", "3.11", "3.12"]
22+
23+ steps :
24+ - name : Checkout code
25+ uses : actions/checkout@v4
26+
27+ - name : Set up uv
28+ uses : astral-sh/setup-uv@v6
29+ with :
30+ version : " latest"
31+ enable-cache : true
32+ python-version : ${{ matrix.python-version }}
33+ cache-dependency-glob : |
34+ uv.lock
35+ pyproject.toml
36+
37+ - name : Install dependencies
38+ run : uv sync --locked
39+
40+ - name : Run all tests
41+ run : uv run pytest
42+ env :
43+ MODELSCOPE_API_TOKEN : ${{ secrets.MODELSCOPE_API_TOKEN }}
44+
45+ - name : Optimize uv cache for CI
46+ run : uv cache prune --ci
You can’t perform that action at this time.
0 commit comments