Playwright e2e tests #142
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Playwright e2e tests | |
on: | |
pull_request: | |
branches: [master] | |
workflow_run: | |
workflows: ['Prettier and linter'] | |
types: | |
- completed | |
concurrency: | |
group: ${{ github.head_ref || github.ref_name }} | |
cancel-in-progress: true | |
jobs: | |
neo4j-read: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
container: | |
image: mcr.microsoft.com/playwright:v1.50.1-noble | |
services: | |
neo4j: | |
image: neo4j:latest | |
env: | |
NEO4J_AUTH: neo4j/nothing123 | |
ports: | |
- 7687:7687 | |
- 7474:7474 | |
options: >- | |
--health-cmd "wget --spider http://localhost:7474 || exit 1" | |
strategy: | |
fail-fast: false | |
matrix: | |
shardIndex: [1, 2, 3, 4, 5, 6, 7, 8] | |
shardTotal: [8] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- name: Install dependencies | |
run: npm ci | |
- name: Load movies dataset | |
run: node e2e/load-dataset.js | |
env: | |
DB_HOSTNAME: 'bolt://neo4j:7687' | |
DB_USERNAME: 'neo4j' | |
DB_PASSWORD: 'nothing123' | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps chromium | |
- name: Run Playwright tests (neo4j-read) | |
run: npx playwright test --grep @neo4j-read --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} | |
env: | |
DB_HOSTNAME: 'bolt://neo4j:7687' | |
DB_USERNAME: 'neo4j' | |
DB_PASSWORD: 'nothing123' | |
build: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
container: | |
image: mcr.microsoft.com/playwright:v1.50.1-noble | |
services: | |
neo4j: | |
image: neo4j:latest | |
env: | |
NEO4J_AUTH: neo4j/nothing123 | |
ports: | |
- 7687:7687 | |
- 7474:7474 | |
options: >- | |
--health-cmd "wget --spider http://localhost:7474 || exit 1" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- name: Install dependencies | |
run: npm ci | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps chromium | |
- name: Build | |
run: npm run build | |
- name: Run Playwright tests (build) | |
run: npx playwright test --grep @build | |
env: | |
DB_HOSTNAME: 'bolt://neo4j:7687' | |
DB_USERNAME: 'neo4j' | |
DB_PASSWORD: 'nothing123' | |
neo4j-write: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
container: | |
image: mcr.microsoft.com/playwright:v1.50.1-noble | |
services: | |
neo4j: | |
image: neo4j:latest | |
env: | |
NEO4J_AUTH: neo4j/nothing123 | |
ports: | |
- 7687:7687 | |
- 7474:7474 | |
options: >- | |
--health-cmd "wget --spider http://localhost:7474 || exit 1" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- name: Install dependencies | |
run: npm ci | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps chromium | |
- name: Run Playwright tests (neo4j-write) | |
run: npx playwright test --grep @neo4j-write | |
env: | |
DB_HOSTNAME: 'bolt://neo4j:7687' | |
DB_USERNAME: 'neo4j' | |
DB_PASSWORD: 'nothing123' | |
neo4j-multidb: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
container: | |
image: mcr.microsoft.com/playwright:v1.50.1-noble | |
services: | |
neo4j: | |
image: neo4j:enterprise | |
env: | |
NEO4J_AUTH: neo4j/nothing123 | |
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes | |
ports: | |
- 7687:7687 | |
- 7474:7474 | |
options: >- | |
--health-cmd "wget --spider http://localhost:7474 || exit 1" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- name: Install dependencies | |
run: npm ci | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps chromium | |
- name: Run Playwright tests (neo4j-multidb) | |
run: npx playwright test --grep @neo4j-multidb | |
env: | |
DB_HOSTNAME: 'bolt://neo4j:7687' | |
DB_USERNAME: 'neo4j' | |
DB_PASSWORD: 'nothing123' | |
memgraph: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
container: | |
image: mcr.microsoft.com/playwright:v1.50.1-noble | |
services: | |
memgraph: | |
image: memgraph/memgraph:latest | |
ports: | |
- 7687:7687 | |
options: >- | |
--health-cmd "echo 'RETURN 0;' | mgconsole || exit 1" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- name: Install dependencies | |
run: npm ci | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps chromium | |
- name: Run Playwright tests (memgraph) | |
run: npx playwright test --grep @memgraph | |
env: | |
DB_HOSTNAME: 'bolt://memgraph:7687' |