diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml new file mode 100644 index 00000000..1f2f264f --- /dev/null +++ b/.github/workflows/playwright.yml @@ -0,0 +1,37 @@ +name: Playwright Tests +on: + push: + branches: + - main + pull_request: + branches: + - main + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + test: + env: + HOME: /root + name: 'Playwright Tests' + runs-on: ubuntu-latest + container: + image: mcr.microsoft.com/playwright:v1.46.1-jammy + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Install dependencies (clean install) + run: npm ci + - name: Install Playwright Browsers + run: npx playwright install --with-deps + - name: Run Playwright tests + run: npm test + - name: Upload test results + uses: actions/upload-artifact@v4 + if: always() + with: + name: playwright-report + path: playwright-report + retention-days: 30 diff --git a/.gitignore b/.gitignore index dbf6e269..42cf0f6a 100644 --- a/.gitignore +++ b/.gitignore @@ -43,4 +43,8 @@ yarn.lock !bower.json !composer.json -!package.js \ No newline at end of file +!package.js +/test-results/ +/playwright-report/ +/blob-report/ +/playwright/.cache/ diff --git a/hello-world/read-an-image.html b/hello-world/read-an-image.html index 315df11d..9ba7e488 100644 --- a/hello-world/read-an-image.html +++ b/hello-world/read-an-image.html @@ -44,6 +44,152 @@