Skip to content

Commit 84327e3

Browse files
authored
ci: enable logging only when debug logging is enabled (#1204)
* ci: enable logging only when debug logging is enabled * fixup! ci: enable logging only when debug logging is enabled
1 parent e44be05 commit 84327e3

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,20 @@ jobs:
4747
run: |
4848
sudo echo "127.0.0.1" `hostname` | sudo tee -a /etc/hosts
4949
50+
# Enables the output of log messages from the Node.js debug module
51+
# for workflow runs that are being retried with "debug logging"
52+
# enabled.
53+
#
54+
# See https://github.com/eclipse-thingweb/node-wot/pull/1204 for
55+
# more context regarding the rationale of this step.
56+
- name: Configure debug logging
57+
if: runner.debug == '1'
58+
run: echo "DEBUG=node-wot*" >> $GITHUB_ENV
59+
shell: bash
60+
5061
- name: Test with coverage report
51-
uses: nick-fields/retry@v2
52-
with:
53-
timeout_minutes: 10
54-
max_attempts: 2
55-
command: npm run coverage:only
56-
# Rerun with debug logging enabled on error, but always fail the retry
57-
new_command_on_retry: |
58-
DEBUG=node-wot* npm run test:only
59-
exit 1
60-
shell: bash
62+
timeout-minutes: 10
63+
run: npm run coverage:only
6164

6265
- name: Upload to codecov.io
6366
uses: codecov/codecov-action@v2

0 commit comments

Comments
 (0)