testing a simple CI config first#850
Conversation
|
Too strict, has to rerun the classic Mongo test isolation bugs instead of failing the run completely. Adjusting. |
|
|
hoan301298
left a comment
There was a problem hiding this comment.
I think the current setup makes sense. Approved! Well done.
In the dedicated coverage.yml workflow, using if-no-files-found: error also makes sense since generating coverage is the primary goal there.
I added comments, some of them were from AI suggestions. Feel free to discuss and if you think they're no need for this ci workflows, ignore them 👍
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '24' |
There was a problem hiding this comment.
I think now we are using the lower version of node 20/22. It might be a problem in future. Just choose a safer one. Please check other usage as well. 😄
There was a problem hiding this comment.
I'm currently using Node v25.9.0
| - name: Run tests (first attempt) | ||
| id: first_run | ||
| continue-on-error: true | ||
| run: npm run test -- --json --outputFile=test-results.json |
There was a problem hiding this comment.
guarantee coverage exists
run: |
npm run test -- \
--coverage \
--json \
--outputFile=test-results.json
| push: | ||
| branches: | ||
| - dev | ||
|
|
There was a problem hiding this comment.
Prevents old coverage runs from continuing after new commits are pushed
concurrency:
group: coverage-${{ github.ref }}
cancel-in-progress: true
| with: | ||
| name: coverage-report-${{ github.sha }} | ||
| path: coverage/ | ||
| retention-days: 30 No newline at end of file |
There was a problem hiding this comment.
The dedicated coverage workflow exists specifically to generate coverage.
If the coverage/ folder is missing there, something is wrong:
tests didn’t run correctly
coverage config broke
Jest stopped generating reports
So failing the workflow is useful:
if-no-files-found: error
because coverage generation is the primary goal of that workflow.
Brief description
This is just a test for GitHub Actions in the future, might fail completely on the first run and might not even work together with Jenkins, since Jenkins is still active.
Change list
ci.ymlandcoverage.yml