Compare commits

...

5 Commits

Author SHA1 Message Date
Nemanja
aad94660c0 final tweak 2025-10-25 01:19:06 +02:00
Nemanja
eededdc24b increase timeout 2025-10-25 00:49:49 +02:00
Nemanja
24a2c17a65 try sharding 2025-10-25 00:30:53 +02:00
Nemanja
0330aa902a fix test 2025-10-25 00:04:35 +02:00
Nemanja
ae1f11256e Test the fix 2025-10-24 23:48:17 +02:00
2 changed files with 42 additions and 9 deletions

View File

@@ -1,23 +1,59 @@
name: Test coverage
on:
push:
workflow_dispatch:
schedule:
- cron: '40 1 * * *' # every day at 1:40
jobs:
fe-test-coverage:
runs-on: ubuntu-22.04
timeout-minutes: 30
timeout-minutes: 60
strategy:
fail-fast: true
matrix:
shard: [1, 2]
shard-total: [2]
steps:
- uses: actions/checkout@v4
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
- name: Run frontend unit tests
run: yarn run test-unit --silent --coverage
- name: Upload coverage to codecov.io
uses: codecov/codecov-action@v4
- name: Run frontend unit tests (shard ${{ matrix.shard }}/${{ matrix.shard-total }})
run: |
yarn run test-unit \
--silent \
--coverage \
--testTimeout=60000 \
--shard=${{ matrix.shard }}/${{ matrix.shard-total }}
- name: Upload coverage for shard ${{ matrix.shard }}
uses: actions/upload-artifact@v4
with:
name: coverage-shard-${{ matrix.shard }}
path: coverage/
retention-days: 1
merge-coverage:
runs-on: ubuntu-22.04
timeout-minutes: 10
needs: fe-test-coverage
if: success()
steps:
- uses: actions/checkout@v4
- name: Download all coverage artifacts
uses: actions/download-artifact@v4
with:
path: coverage-artifacts
pattern: coverage-shard-*
- name: Merge coverage reports
run: |
mkdir -p coverage
npx nyc merge coverage-artifacts coverage/coverage-final.json
npx nyc report --temp-dir=coverage --reporter=lcov --reporter=text --report-dir=coverage
- name: Upload merged coverage to codecov.io
uses: codecov/codecov-action@v5
with:
files: ./coverage/lcov.info
flags: front-end

View File

@@ -29,10 +29,7 @@ const setup = async (
describe("EditableDashboard", () => {
it("should support dashboard editing", async () => {
await setup();
await waitFor(() => {
expect(screen.getByTestId("dashboard-header")).toBeInTheDocument();
});
expect(await screen.findByTestId("dashboard-header")).toBeInTheDocument();
const editButton = within(
screen.getByTestId("dashboard-header"),