Skip to content

Commit

Permalink
⚗️ Github action
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-maertens committed Apr 4, 2024
1 parent d628c38 commit ef927fd
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/actions/report-flaky/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---

name: Report flaky tests
description: Parses log file for flaky tests and adds annotations for them
inputs:
logFile:
description: Log file containing the flaky test logs
required: true
default: 'log/flaky.jsonl'
outputs:
runs:
using: 'node20'
main: 'report_flaky.js'
6 changes: 6 additions & 0 deletions .github/actions/report-flaky/report_flaky.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const core = require('@actions/core');

const logFilePath = core.getInput('logFile');
console.log('CWD: ', process.cwd());

core.warning('A warning', {file: 'dummy.py', line: 69});
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ jobs:
DB_PASSWORD: ''
DEBUG: 'true'

- uses: ../actions/report-flaky

- name: Run JS tests
run: npm test

Expand Down Expand Up @@ -178,6 +180,8 @@ jobs:
DB_PASSWORD: ''
DEBUG: 'true'

- uses: ../actions/report-flaky

e2etests:
runs-on: ubuntu-latest
strategy:
Expand Down

0 comments on commit ef927fd

Please sign in to comment.