@@ -14,50 +14,53 @@ jobs:
1414 runs-on : ubuntu-latest
1515
1616 steps :
17- - name : Checkout repository
18- uses : actions/checkout@v3
19-
20- - name : Set up Python
21- uses : actions/setup-python@v4
22- with :
23- python-version : ' 3.9'
24-
25- - name : Cache tox environments
26- uses : actions/cache@v3
27- with :
28- path : .tox/
29- key : ${{ runner.os }}-tox-${{ hashFiles('**/pyproject.toml', '**/tox.ini') }}
30- restore-keys : |
31- ${{ runner.os }}-tox-
32- - name : Install tox
33- run : pip install tox
34-
35- - name : Create test env
36- shell : bash
37- run : |
38- cp sample.env .env
39- sed -i "s|LLMWHISPERER_API_KEY=|LLMWHISPERER_API_KEY=${{ secrets.LLMWHISPERER_API_KEY }}|" .env
40-
41- - name : Run tox
42- id : tox
43- run : |
44- tox
45- - name : Render the report to the PR
46- uses : marocchino/sticky-pull-request-comment@v2
47- with :
48- header : llmw-py-client-test-report
49- recreate : true
50- path : llmw-py-client-report.md
51-
52- - name : Output reports to the job summary when tests fail
53- shell : bash
54- run : |
55- if [ -f "llmw-py-client-report.md" ]; then
56- {
57- echo "<details><summary>Worker Test Report</summary>"
58- echo ""
59- cat "llmw-py-client-report.md"
60- echo ""
61- echo "</details>"
62- } >> "$GITHUB_STEP_SUMMARY"
63- fi
17+ - name : Checkout repository
18+ uses : actions/checkout@v3
19+
20+ - name : Install uv
21+ uses : astral-sh/setup-uv@v5
22+ with :
23+ # Install a specific version of uv.
24+ version : " 0.6.14"
25+ python-version : 3.12.9
26+
27+ - name : Cache tox environments
28+ uses : actions/cache@v4
29+ with :
30+ path : .tox/
31+ key : ${{ runner.os }}-tox-uv-${{ hashFiles('**/pyproject.toml', '**/tox.ini') }}
32+ restore-keys : |
33+ ${{ runner.os }}-tox-uv-
34+
35+ - name : Install tox with UV
36+ run : uv pip install tox tox-uv
37+
38+ - name : Create test env
39+ shell : bash
40+ run : |
41+ cp sample.env .env
42+ sed -i "s|LLMWHISPERER_API_KEY=|LLMWHISPERER_API_KEY=${{ secrets.LLMWHISPERER_API_KEY }}|" .env
43+
44+ - name : Run tox
45+ id : tox
46+ run : |
47+ tox
48+ - name : Render the report to the PR
49+ uses : marocchino/sticky-pull-request-comment@v2
50+ with :
51+ header : llmw-py-client-test-report
52+ recreate : true
53+ path : llmw-py-client-report.md
54+
55+ - name : Output reports to the job summary when tests fail
56+ shell : bash
57+ run : |
58+ if [ -f "llmw-py-client-report.md" ]; then
59+ {
60+ echo "<details><summary>Worker Test Report</summary>"
61+ echo ""
62+ cat "llmw-py-client-report.md"
63+ echo ""
64+ echo "</details>"
65+ } >> "$GITHUB_STEP_SUMMARY"
66+ fi
0 commit comments