trim response to just needed body (#7207) #22698
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test | |
| on: [push, pull_request] | |
| env: | |
| NODE_VERSION: 20.x | |
| jobs: | |
| Tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js ${{ env.NODE_VERSION }} | |
| uses: actions/setup-node@v4.1.0 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - name: Node.js modules cache, repository | |
| uses: actions/cache@v4 | |
| id: repo-cache | |
| with: | |
| path: ${{ github.workspace }}/node_modules | |
| key: ${{ runner.os }}-${{ env.NODE_VERSION }}-modules-repo-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ env.NODE_VERSION }}-modules-repo | |
| - name: Node.js modules cache, backend | |
| uses: actions/cache@v4 | |
| id: backend-cache | |
| with: | |
| path: ${{ github.workspace }}/backend/node_modules | |
| key: ${{ runner.os }}-${{ env.NODE_VERSION }}-modules-backend-${{ hashFiles('**/backend/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ env.NODE_VERSION }}-modules-backend | |
| - name: Node.js modules cache, frontend | |
| uses: actions/cache@v4 | |
| id: frontend-cache | |
| with: | |
| path: | | |
| ~/.cache/Cypress | |
| ${{ github.workspace }}/frontend/node_modules | |
| key: ${{ runner.os }}-${{ env.NODE_VERSION }}-modules-frontend-${{ hashFiles('**/frontend/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ env.NODE_VERSION }}-modules-frontend | |
| - name: Install Node.js packages | |
| if: ${{ steps.repo-cache.outputs.cache-hit != 'true' || steps.backend-cache.outputs.cache-hit != 'true' || steps.frontend-cache.outputs.cache-hit != 'true' }} | |
| run: npm install | |
| - name: Check for uncomitted changes | |
| run: | | |
| git diff --exit-code | |
| - name: Test backend & test frontend with code coverage | |
| if: ${{ success() }} | |
| run: npm run test:backend && npm run test:frontend:coverage | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v4.6.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false | |
| name: frontend | |
| directory: ./frontend/coverage | |
| verbose: true | |
| - uses: actions/upload-artifact@v4 | |
| if: ${{ always() }} | |
| with: | |
| name: cypress-results | |
| path: ./frontend/src/__tests__/cypress/results/ |