Skip to content

Commit c40273c

Browse files
committed
redis/mongodb on github?
1 parent 398e9b3 commit c40273c

File tree

1 file changed

+55
-15
lines changed

1 file changed

+55
-15
lines changed

.github/workflows/tests.yml

Lines changed: 55 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@ on:
88
jobs:
99
build:
1010
runs-on: ubuntu-latest
11+
services:
12+
mongodb:
13+
image: mongodb/mongodb-community-server:8.0-ubi
14+
ports:
15+
- 27017:27017
16+
options: >
17+
--health-cmd "mongosh --eval 'db.runCommand(\"ping\").ok'" mongodb://localhost:27017/test --quiet
18+
--health-interval 10s --health-timeout 5s --health-retries 5
19+
redis:
20+
image: redis:6-alpine
21+
ports:
22+
- 6379:6379
23+
options: >
24+
--health-cmd "redis-cli ping"
25+
--health-interval 10s --health-timeout 5s --health-retries 5
1126
steps:
1227
- uses: actions/checkout@v4
1328
- name: install nodejs
@@ -117,18 +132,43 @@ jobs:
117132
env:
118133
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
119134
if: always()
120-
# - name: Start MongoDB
121-
# uses: supercharge/mongodb-github-action@1.12.1
122-
# with:
123-
# mongodb-version: 8.0.4
124-
# - name: Start Redis
125-
# uses: supercharge/redis-github-action@1.8.1
126-
# with:
127-
# redis-version: 6.0.16
128-
# - name: Start PM2
129-
# run: |
130-
# npm run pm2:test
131-
# - name: api tests
132-
# run: |
133-
# cd cables_api/
134-
# npm run test
135+
- name: API Tests
136+
run: |
137+
npm run pm2:test
138+
pm2 status
139+
cd cables_api/
140+
npm run test:api
141+
pm2 stop all
142+
- name: Publish API Tests Summary Results
143+
uses: ctrf-io/github-test-reporter@v1
144+
with:
145+
report-path: './cables_api/ctrf/*.json'
146+
github-report: true
147+
summary-delta-report: true
148+
insights-report: true
149+
flaky-rate-report: true
150+
fail-rate-report: true
151+
slowest-report: true
152+
upload-artifact: true
153+
suite-folded-report: true
154+
artifact-name: "api-report"
155+
- name: Views Tests
156+
run: |
157+
npm run pm2:test
158+
pm2 status
159+
cd cables_api/
160+
npm run test:views
161+
pm2 stop all
162+
- name: Publish Views Tests Summary Results
163+
uses: ctrf-io/github-test-reporter@v1
164+
with:
165+
report-path: './cables_api/ctrf/*.json'
166+
github-report: true
167+
summary-delta-report: true
168+
insights-report: true
169+
flaky-rate-report: true
170+
fail-rate-report: true
171+
slowest-report: true
172+
upload-artifact: true
173+
suite-folded-report: true
174+
artifact-name: "views-report"

0 commit comments

Comments
 (0)