A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
CI: Shard frontend tests, improve GC, use max workers (#4316)
shamoon57b8ee37ecbd
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex cf73da15f..15eee01eb 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -98,7 +98,7 @@ jobs:EXTRA_PACKAGES: build-basetests-backend:- name: "Tests (${{ matrix.python-version }})"+ name: "Backend Tests (Python ${{ matrix.python-version }})"runs-on: ubuntu-22.04needs:- pre-commit@@ -173,20 +173,23 @@ jobs:docker compose --file ${GITHUB_WORKSPACE}/docker/compose/docker-compose.ci-test.yml downtests-frontend:- name: "Tests Frontend"+ name: "Frontend Tests (Node ${{ matrix.node-version }} - ${{ matrix.shard-index }}/${{ matrix.shard-count }})"runs-on: ubuntu-22.04needs:- pre-commitstrategy:+ fail-fast: falsematrix:node-version: [20.x]+ shard-index: [1, 2, 3, 4]+ shard-count: [4]steps:- uses: actions/checkout@v4-- name: Use Node.js ${{ matrix.node-version }}+ name: Use Node.js 20uses: actions/setup-node@v3with:- node-version: ${{ matrix.node-version }}+ node-version: 20.xcache: 'npm'cache-dependency-path: 'src-ui/package-lock.json'-@@ -200,19 +203,22 @@ jobs:run: cd src-ui && npm run lint-name: Run Jest unit tests- run: cd src-ui && npm run test+ run: cd src-ui && npm run test -- --max-workers=2 --shard=${{ matrix.shard-index }}/${{ matrix.shard-count }}-name: Upload Jest coverageif: always()uses: actions/upload-artifact@v3with:- name: jest-coverage-report- path: src-ui/coverage+ name: jest-coverage-report-${{ matrix.shard-index }}+ path: |+ src-ui/coverage/coverage-final.json+ src-ui/coverage/lcov.info+ src-ui/coverage/clover.xmlretention-days: 7if-no-files-found: warn-name: Run Playwright e2e tests- run: cd src-ui && npx playwright test+ run: cd src-ui && npx playwright test --shard ${{ matrix.shard-index }}/${{ matrix.shard-count }}-name: Upload Playwright test resultsif: always()@@ -223,7 +229,7 @@ jobs:retention-days: 7tests-coverage-upload:- name: "Upload coverage"+ name: "Upload Coverage"runs-on: ubuntu-22.04needs:- tests-backend@@ -235,8 +241,7 @@ jobs:name: Download frontend coverageuses: actions/download-artifact@v3with:- name: jest-coverage-report- path: src-ui/+ path: src-ui/coverage/-name: Upload frontend coverage to Codecovuses: codecov/codecov-action@v3@@ -244,7 +249,9 @@ jobs:# not required for public repos, but intermittently fails otherwisetoken: ${{ secrets.CODECOV_TOKEN }}flags: frontend- directory: src-ui/+ directory: src-ui/coverage/+ # dont include backend coverage files here+ files: '!coverage.xml'-name: Download backend coverageuses: actions/download-artifact@v3