Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
@group bitballs.serviceModels Service Models
@hide contents

[![Build Status](https://travis-ci.org/donejs/bitballs.svg?branch=master)](https://travis-ci.org/donejs/bitballs)

Bitballs is a [DoneJS](https://donejs.com) app that enables users to coordinate
the players, teams, games, rounds and recordings of a basketball tournament.
It also serves as an example of how to use DoneJS with sessions, user
Expand All @@ -28,7 +26,7 @@ The easiest way to run Bitballs is using Docker. This approach automatically set

1. Clone this repository:
```bash
git clone https://github.com/donejs/bitballs.git
git clone https://github.com/bitovi/bitballs.git
cd bitballs
```

Expand Down Expand Up @@ -165,7 +163,7 @@ Finally, using `pgAdmin III` graphical database manager, which should have been
Clone this repo using git:

```
git clone https://github.com/donejs/bitballs.git
git clone https://github.com/bitovi/bitballs.git
```

Navigate to the repository's directory
Expand Down
2 changes: 1 addition & 1 deletion documentjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"siteDefaults": {
"static": "theme/static",
"source": "https://github.com/donejs/bitballs",
"source": "https://github.com/bitovi/bitballs",
"templates" : "theme/templates"
}
}
110 changes: 110 additions & 0 deletions e2e-test-flows/.github-workflow-example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: Playwright E2E Tests

# This is an example workflow for running Playwright tests
# Copy to .github/workflows/ in the repository root to enable

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]

jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest

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

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"

- name: Start application with Docker
run: |
docker-compose up -d
echo "Waiting for application to be ready..."
npx wait-on http://localhost:5001 --timeout 60000

- name: Install dependencies
working-directory: e2e-test-flows
run: npm ci

- name: Install Playwright browsers
working-directory: e2e-test-flows
run: npx playwright install --with-deps

- name: Run Playwright tests
working-directory: e2e-test-flows
run: npm test

- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: e2e-test-flows/playwright-report/
retention-days: 30

- name: Upload test videos
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-videos
path: e2e-test-flows/test-results/
retention-days: 7

- name: Stop Docker containers
if: always()
run: docker-compose down

test-sharded:
# Example of running tests in parallel across multiple machines
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shardIndex: [1, 2, 3, 4]
shardTotal: [4]

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

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"

- name: Start application with Docker
run: |
docker-compose up -d
npx wait-on http://localhost:5001 --timeout 60000

- name: Install dependencies
working-directory: e2e-test-flows
run: npm ci

- name: Install Playwright browsers
working-directory: e2e-test-flows
run: npx playwright install --with-deps

- name: Run Playwright tests (shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }})
working-directory: e2e-test-flows
run: npx playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}

- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report-${{ matrix.shardIndex }}
path: e2e-test-flows/playwright-report/
retention-days: 30

- name: Stop Docker containers
if: always()
run: docker-compose down
11 changes: 11 additions & 0 deletions e2e-test-flows/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
node_modules/
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
package-lock.json
yarn.lock
pnpm-lock.yaml

# Test users file (generated by global setup)
.test-users.json
10 changes: 10 additions & 0 deletions e2e-test-flows/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Force npm to use exact versions from package-lock.json
package-lock=true

# Automatically save installed packages to package.json
save=true
save-exact=true

# Disable package-lock.json auto-updates during install
# (keeps lock file stable)
prefer-frozen-lockfile=true
Loading