File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Publish Image
22
33on :
4- workflow_run :
5- workflows : ["Test"]
6- types :
7- - completed
8- workflow_dispatch :
4+ push :
5+ branches : ["main"]
6+ tags : ["*"]
97
108permissions :
119 contents : read
1210 packages : write
1311
1412jobs :
13+ test :
14+ name : Run tests before publish
15+ runs-on : ubuntu-latest
16+
17+ services :
18+ redis :
19+ image : redis:7-alpine
20+ ports :
21+ - 6379:6379
22+ options : >-
23+ --health-cmd "redis-cli ping"
24+ --health-interval 5s
25+ --health-timeout 5s
26+ --health-retries 5
27+
28+ steps :
29+ - name : Checkout
30+ uses : actions/checkout@v4
31+
32+ - name : Install uv (with Python 3.12)
33+ uses : astral-sh/setup-uv@v4
34+ with :
35+ python-version : " 3.12"
36+
37+ - name : Install dependencies via uv
38+ run : uv sync --group dev
39+
40+ - name : Run tests
41+ run : uv run pytest --cov=fq_server --cov-branch --cov-report=xml
42+
1543 BuildAndPushImage :
16- if : ${{ github.event.workflow_run.conclusion == 'success' }}
44+ name : Build and push image
45+ needs : test
1746 runs-on : ubuntu-latest
1847
1948 steps :
You can’t perform that action at this time.
0 commit comments