Skip to content

Commit c9b1a74

Browse files
DavertMikclaude
andcommitted
ci(reporter): post test results to GitHub PR comments via @testomatio/reporter
Enable the reporter's GitHub pipe across the mocha-based test workflows so each job posts a pass/fail summary as a PR comment. The reporter was already a devDependency and wired into every mocha script; this only supplies the CI environment it needs: - permissions: pull-requests: write (so github.token can comment) - GH_PAT: ${{ github.token }} (activates the GitHub pipe; matches webdriver.yml) - TESTOMATIO: ${{ secrets.TESTOMATIO }} (activates TMS pipe once the secret is set; dormant no-op until then) Also add the missing --reporter @testomatio/reporter/mocha flag to the bare Playwright/Puppeteer helper unit runs, and drop the now-redundant per-step GH_PAT in webdriver.yml (covered by workflow-level env). Scope is mocha tests only; CodeceptJS acceptance runs are untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 6e4b176 commit c9b1a74

6 files changed

Lines changed: 40 additions & 3 deletions

File tree

.github/workflows/appium_Android.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,18 @@ concurrency:
1313
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1414
cancel-in-progress: true
1515

16+
permissions:
17+
contents: read
18+
pull-requests: write
19+
1620
env:
1721
CI: true
1822
# Force terminal colors. @see https://www.npmjs.com/package/colors
1923
FORCE_COLOR: 1
2024
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
2125
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
26+
GH_PAT: ${{ github.token }}
27+
TESTOMATIO: ${{ secrets.TESTOMATIO }}
2228

2329
jobs:
2430
appium:

.github/workflows/playwright.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,16 @@ concurrency:
1212
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1313
cancel-in-progress: true
1414

15+
permissions:
16+
contents: read
17+
pull-requests: write
18+
1519
env:
1620
CI: true
1721
# Force terminal colors. @see https://www.npmjs.com/package/colors
1822
FORCE_COLOR: 1
23+
GH_PAT: ${{ github.token }}
24+
TESTOMATIO: ${{ secrets.TESTOMATIO }}
1925

2026
jobs:
2127
build:
@@ -69,6 +75,6 @@ jobs:
6975
- name: run webkit tests
7076
run: 'BROWSER=webkit node ./bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug'
7177
- name: run chromium unit tests
72-
run: ./node_modules/.bin/mocha test/helper/Playwright_test.js --timeout 15000
78+
run: ./node_modules/.bin/mocha test/helper/Playwright_test.js --timeout 15000 --reporter @testomatio/reporter/mocha
7379
- name: Stop mock server
7480
run: npm run mock-server:stop

.github/workflows/plugin.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,16 @@ concurrency:
1212
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1313
cancel-in-progress: true
1414

15+
permissions:
16+
contents: read
17+
pull-requests: write
18+
1519
env:
1620
CI: true
1721
# Force terminal colors. @see https://www.npmjs.com/package/colors
1822
FORCE_COLOR: 1
23+
GH_PAT: ${{ github.token }}
24+
TESTOMATIO: ${{ secrets.TESTOMATIO }}
1925

2026
jobs:
2127
build:

.github/workflows/puppeteer.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,16 @@ concurrency:
1212
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1313
cancel-in-progress: true
1414

15+
permissions:
16+
contents: read
17+
pull-requests: write
18+
1519
env:
1620
CI: true
1721
# Force terminal colors. @see https://www.npmjs.com/package/colors
1822
FORCE_COLOR: 1
23+
GH_PAT: ${{ github.token }}
24+
TESTOMATIO: ${{ secrets.TESTOMATIO }}
1925

2026
jobs:
2127
build:
@@ -55,6 +61,6 @@ jobs:
5561
- name: run tests
5662
run: './bin/codecept.js run-workers 2 -c test/acceptance/codecept.Puppeteer.js --grep @Puppeteer --debug'
5763
- name: run unit tests
58-
run: ./node_modules/.bin/mocha test/helper/Puppeteer_test.js
64+
run: ./node_modules/.bin/mocha test/helper/Puppeteer_test.js --reporter @testomatio/reporter/mocha
5965
- name: Stop mock server
6066
run: npm run mock-server:stop

.github/workflows/test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ concurrency:
1212
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1313
cancel-in-progress: true
1414

15+
permissions:
16+
contents: read
17+
pull-requests: write
18+
19+
env:
20+
GH_PAT: ${{ github.token }}
21+
TESTOMATIO: ${{ secrets.TESTOMATIO }}
22+
1523
jobs:
1624
unit-tests:
1725
name: Unit tests

.github/workflows/webdriver.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,16 @@ concurrency:
1212
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1313
cancel-in-progress: true
1414

15+
permissions:
16+
contents: read
17+
pull-requests: write
18+
1519
env:
1620
CI: true
1721
# Force terminal colors. @see https://www.npmjs.com/package/colors
1822
FORCE_COLOR: 1
23+
GH_PAT: ${{ github.token }}
24+
TESTOMATIO: ${{ secrets.TESTOMATIO }}
1925

2026
jobs:
2127
build:
@@ -55,7 +61,6 @@ jobs:
5561
run: './bin/codecept.js check -c test/acceptance/codecept.WebDriver.js'
5662
timeout-minutes: 2
5763
env:
58-
GH_PAT: ${{ github.token }}
5964
SELENIUM_HOST: localhost
6065
SELENIUM_PORT: 4444
6166
- name: run unit tests

0 commit comments

Comments
 (0)