From 22b4a6bd27be5609e5ddcb4c2e3790b1686fc653 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Tue, 23 Jun 2020 17:18:29 -0700 Subject: [PATCH] devops: enable coredumps for headful tests (#2678) --- .github/workflows/tests.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3e8b2e407c..538a191fd5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -322,9 +322,13 @@ jobs: node-version: 10 - uses: microsoft/playwright-github-action@v1 - run: npm ci + - run: mkdir -p coredumps + # Set core dump file name pattern + - run: sudo bash -c 'echo "$(pwd -P)/coredumps/core-pid_%p.dump" > /proc/sys/kernel/core_pattern' # XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR # Wrap `npm run` in a subshell to redirect STDERR to file. - - run: xvfb-run --auto-servernum -- bash -c "HEADLESS=false npm run test -- --line-break=100 2>./headful-linux-testrun.log" + # Enable core dumps in the subshell. + - run: xvfb-run --auto-servernum -- bash -c "ulimit -c unlimited && HEADLESS=false npm run test -- --line-break=100 2>./headful-linux-testrun.log" env: DEBUG: "*" - uses: actions/upload-artifact@v1 @@ -332,3 +336,8 @@ jobs: with: name: headful-linux-testrun.log path: headful-linux-testrun.log + - uses: actions/upload-artifact@v1 + if: failure() + with: + name: headful-linux-coredumps + path: coredumps