|
8 | 8 | jobs: |
9 | 9 | build: |
10 | 10 | 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 |
11 | 26 | steps: |
12 | 27 | - uses: actions/checkout@v4 |
13 | 28 | - name: install nodejs |
@@ -117,18 +132,43 @@ jobs: |
117 | 132 | env: |
118 | 133 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
119 | 134 | 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