Skip to content

Commit 727641a

Browse files
committed
🚢 test: sqlite
1 parent fc12901 commit 727641a

File tree

1 file changed

+49
-3
lines changed

1 file changed

+49
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,51 @@ jobs:
8787
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_CHECK }}
8888
if: always()
8989

90-
test:
90+
test-sqlite:
91+
name: Test SQLite
92+
needs: lint
93+
runs-on: ubuntu-latest
94+
steps:
95+
- name: Checkout repository
96+
uses: actions/checkout@v4
97+
98+
- name: Cache virtualenv
99+
uses: actions/cache@v4
100+
with:
101+
path: .venv
102+
key: ${{ runner.os }}-python-uv-venv-${{ github.sha }}
103+
restore-keys: |
104+
${{ runner.os }}-python-uv-venv-
105+
106+
- name: Run pytest
107+
run: |
108+
source .venv/bin/activate
109+
make test
110+
111+
- name: Upload test results to Codecov
112+
uses: codecov/test-results-action@v1
113+
with:
114+
flags: sqlite
115+
token: ${{ secrets.CODECOV_TOKEN }}
116+
117+
- name: Upload results to Codecov
118+
uses: codecov/codecov-action@v5
119+
with:
120+
flags: sqlite
121+
token: ${{ secrets.CODECOV_TOKEN }}
122+
123+
- name: Slack webhook
124+
uses: 8398a7/action-slack@v3
125+
with:
126+
status: ${{ job.status }}
127+
author_name: fastapi-cookbook
128+
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took
129+
if_mention: failure,cancelled
130+
env:
131+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_CHECK }}
132+
if: always()
133+
134+
test-mysql:
91135
env:
92136
DB_ROOT: "password"
93137
DB_TYPE: "mysql"
@@ -117,8 +161,8 @@ jobs:
117161
--health-timeout=5s
118162
--health-retries=3
119163
120-
name: Test
121-
needs: setup
164+
name: Test MySQL
165+
needs: lint
122166
runs-on: ubuntu-latest
123167
steps:
124168
- name: Checkout repository
@@ -146,11 +190,13 @@ jobs:
146190
- name: Upload test results to Codecov
147191
uses: codecov/test-results-action@v1
148192
with:
193+
flags: mysql
149194
token: ${{ secrets.CODECOV_TOKEN }}
150195

151196
- name: Upload results to Codecov
152197
uses: codecov/codecov-action@v5
153198
with:
199+
flags: mysql
154200
token: ${{ secrets.CODECOV_TOKEN }}
155201

156202
- name: Slack webhook

0 commit comments

Comments
 (0)