Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .env.example
100644 → 100755
Empty file.
288 changes: 145 additions & 143 deletions .github/workflows/test.yml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,127 +1,13 @@
# .github/workflows/playwright-daily.yml
# Runs Playwright test shards every day at **11 : 42 AM IST** (06 : 12 UTC)
# plus anytime you trigger it manually from the Actions tab.

name: Run Playwright tests

on:
push: # runs on every push
pull_request: # runs on new PRs or PR updates
schedule:
- cron: '30 3 * * 1-5'
workflow_dispatch:

jobs:
run-tests:
name: Run shard ${{ matrix.shardIndex }}/5
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
shardIndex: [1,2,3,4,5]
shardTotal: [5]

steps:
- uses: actions/checkout@v4

- name: Setup Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Create .env file
run: |
echo "USERNAME=${{ secrets.USERNAME }}" >> .env
echo "PASSWORD=${{ secrets.PASSWORD }}" >> .env
echo "NEW_PASSWORD=${{ secrets.NEW_PASSWORD }}" >> .env
echo "FIRST_NAME=${{ secrets.FIRST_NAME }}" >> .env
echo "STREET_NAME=${{ secrets.STREET_NAME }}" >> .env
echo "CITY=${{ secrets.CITY }}" >> .env
echo "STATE=${{ secrets.STATE }}" >> .env
echo "COUNTRY=${{ secrets.COUNTRY }}" >> .env
echo "ZIP_CODE=${{ secrets.ZIP_CODE }}" >> .env

- name: Cache npm dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install deps + browsers
run: |
npm ci
npx playwright install --with-deps chromium firefox webkit
- name: List Playwright projects (debug)
run: npx playwright list --projects | cat

- name: Run shard ${{ matrix.shardIndex }}
run: npx playwright test --grep="@chromium|@firefox|@webkit|@android|@ios|@api" --reporter=blob --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}

- name: Upload blob report
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: blob-report-${{ matrix.shardIndex }}
path: ./blob-report
retention-days: 1

merge-reports:
name: Merge Reports
needs: run-tests
if: always() # run even if some shards fail
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Cache npm dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install deps + browsers
run: |
npm ci
npx playwright install --with-deps
- name: Download all blob reports
uses: actions/download-artifact@v4
with:
path: ./all-blob-reports
pattern: blob-report-*
merge-multiple: true

- name: Merge HTML & JSON reports
run: npx playwright merge-reports --reporter=html ./all-blob-reports

- name: Upload combined report
uses: actions/upload-artifact@v4
with:
name: Playwright Test Report
path: ./playwright-report
retention-days: 14

- name: Send TestDino report
run: |
npx --yes tdpw ./playwright-report \
--token="${{ secrets.TESTDINO_TOKEN }}" \
--upload-html \
--verbose


# name: Run Playwright tests

# on:
# push:
# pull_request:
# push: # runs on every push
# pull_request: # runs on new PRs or PR updates
# schedule:
# - cron: '30 3 * * 1-5'
# workflow_dispatch:

# jobs:
Expand All @@ -132,20 +18,17 @@ jobs:
# strategy:
# fail-fast: false
# matrix:
# shardIndex: [1, 2, 3, 4, 5]
# shardIndex: [1,2,3,4,5]
# shardTotal: [5]

# steps:
# - name: Checkout repo
# uses: actions/checkout@v4
# - uses: actions/checkout@v4

# # ✅ Required Node version
# - name: Setup Node.js 20.x
# uses: actions/setup-node@v4
# - name: Setup Node.js 18.x
# uses: actions/setup-node@v3
# with:
# node-version: '20'
# node-version: '18'

# # ✅ Required env variables for tests
# - name: Create .env file
# run: |
# echo "USERNAME=${{ secrets.USERNAME }}" >> .env
Expand All @@ -157,37 +40,156 @@ jobs:
# echo "STATE=${{ secrets.STATE }}" >> .env
# echo "COUNTRY=${{ secrets.COUNTRY }}" >> .env
# echo "ZIP_CODE=${{ secrets.ZIP_CODE }}" >> .env

# # ✅ Cache npm dependencies

# - name: Cache npm dependencies
# uses: actions/cache@v3
# with:
# path: ~/.npm
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-node-

# # ✅ Install dependencies + TestDino (.tgz) + Playwright browsers
# - name: Install dependencies & browsers
# - name: Install deps + browsers
# run: |
# npm install
# npm install --save-dev @testdino/playwright@latest
# npm ci
# npx playwright install --with-deps chromium firefox webkit
# - name: List Playwright projects (debug)
# run: npx playwright list --projects | cat

# # ✅ Run Playwright shard with TestDino
# - name: Run Playwright shard with TestDino
# env:
# TESTDINO_TOKEN: ${{ secrets.TESTDINO_TOKEN }}
# run: |
# npx playwright test \
# --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} \
# --grep "@chromium|@firefox|@webkit|@android|@ios|@api" \
# - name: Run shard ${{ matrix.shardIndex }}
# run: npx playwright test --grep="@chromium|@firefox|@webkit|@android|@ios|@api" --reporter=blob --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}

# # ✅ Upload blob report (needed for merge)
# - name: Upload blob report
# if: ${{ !cancelled() }}
# uses: actions/upload-artifact@v4
# with:
# name: blob-report-${{ matrix.shardIndex }}
# path: ./blob-report
# retention-days: 1
# retention-days: 1

# merge-reports:
# name: Merge Reports
# needs: run-tests
# if: always() # run even if some shards fail
# runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v4

# - name: Setup Node.js 18.x
# uses: actions/setup-node@v3
# with:
# node-version: '18'

# - name: Cache npm dependencies
# uses: actions/cache@v3
# with:
# path: ~/.npm
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-node-
# - name: Install deps + browsers
# run: |
# npm ci
# npx playwright install --with-deps
# - name: Download all blob reports
# uses: actions/download-artifact@v4
# with:
# path: ./all-blob-reports
# pattern: blob-report-*
# merge-multiple: true

# - name: Merge HTML & JSON reports
# run: npx playwright merge-reports --reporter=html ./all-blob-reports

# - name: Upload combined report
# uses: actions/upload-artifact@v4
# with:
# name: Playwright Test Report
# path: ./playwright-report
# retention-days: 14


name: Run Playwright tests

on:
workflow_dispatch:
inputs:
test_count:
description: 'Number of TC- tests to generate (max 5000)'
required: false
default: '5'

jobs:
run-tests:
name: Run shard ${{ matrix.shardIndex }}/15
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
shardIndex: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
shardTotal: [15]

steps:
- name: Checkout repo
uses: actions/checkout@v4

# ✅ Required Node version
- name: Setup Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: '20'

# ✅ Required env variables for tests
- name: Create .env file
run: |
echo "USERNAME=${{ secrets.USERNAME }}" >> .env
echo "PASSWORD=${{ secrets.PASSWORD }}" >> .env
echo "NEW_PASSWORD=${{ secrets.NEW_PASSWORD }}" >> .env
echo "FIRST_NAME=${{ secrets.FIRST_NAME }}" >> .env
echo "STREET_NAME=${{ secrets.STREET_NAME }}" >> .env
echo "CITY=${{ secrets.CITY }}" >> .env
echo "STATE=${{ secrets.STATE }}" >> .env
echo "COUNTRY=${{ secrets.COUNTRY }}" >> .env
echo "ZIP_CODE=${{ secrets.ZIP_CODE }}" >> .env
# ✅ Cache npm dependencies
- name: Cache npm dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
# ✅ Install dependencies + TestDino (.tgz) + Playwright browsers
- name: Install dependencies & browsers
run: |
npm install
npx playwright install --with-deps chromium
# ✅ Run Playwright shard with real-time TestDino streaming
- name: Run Playwright shard with TestDino
env:
TESTDINO_TOKEN: ${{ secrets.TESTDINO_TOKEN }}
TESTDINO_SERVER_URL: https://stg-analytics.testdino.com
TC_COUNT: ${{ github.event.inputs.test_count || '5' }}
run: |
npx playwright test \
--shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} \
--workers=7 \
--pass-with-no-tests \
--grep="@chromium|@firefox|@webkit|@android|@ios|@api"
# ✅ Upload test results to BuildPulse (runs even when tests fail)
- name: Upload test results to BuildPulse
if: always()
uses: BuildPulseLLC/test-reporter-action@v3
with:
api-token: ${{ secrets.BUILDPULSE_API_TOKEN }}
path: junit.xml

# ✅ Upload blob report (needed for merge)
- name: Upload blob report
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: blob-report-${{ matrix.shardIndex }}
path: ./blob-report
retention-days: 1
Empty file modified .gitignore
100644 → 100755
Empty file.
21 changes: 21 additions & 0 deletions LICENCE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 TestDino

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading