Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add github actions workflow #2

Merged
merged 15 commits into from
Feb 7, 2024
33 changes: 33 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Playwright Tests
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm ci

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Build App
run: npm run build

- name: Run Playwright tests
run: npx playwright test

- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ next-env.d.ts
# Vscode
.vs/*
/test-results/

#Playwright

/playwright-report/
/blob-report/
/playwright/.cache/
/playwright/.auth/
9 changes: 9 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Intro

This repository contains a simple web app and Playwright setup to give attendees the opportunity to get familiar with Playwrights features

## Getting started

1. `npm install`
2. `npm run build`
3. in a seperate shell: `npm run test` or `npx playwright test --ui`
154 changes: 28 additions & 126 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"lint": "next lint",
"postinstall": "prisma generate",
"test": "playwright test",
"post": "prisma migrate reset --force"
"post": "prisma migrate reset --force",
"snapshot-update": " docker run -v ./:/workshop/ -it --rm --ipc=host mcr.microsoft.com/playwright:v1.41.1-jammy /bin/bash "
},
"dependencies": {
"@faker-js/faker": "^8.4.0",
Expand All @@ -31,9 +32,9 @@
"tailwindcss": "3.4.1"
},
"devDependencies": {
"@playwright/test": "^1.40.1",
"@playwright/test": "^1.41.2",
"@types/node": "^20.11.16",
"axe-playwright": "^2.0.1",
"@axe-core/playwright": "^4.8.4",
"eslint-plugin-playwright": "^0.22.2",
"prisma": "5.8.1",
"ts-node": "^10.9.2",
Expand Down
Loading
Loading