Skip to content

fixed the variable name issue #32

fixed the variable name issue

fixed the variable name issue #32

Workflow file for this run

name: Playwright Tests
on:
push:
branches: [level.4]
workflow_dispatch:
inputs:
environment:
description: "Deployment environment"
type: choice
default: "live"
options:
- live
- test
permissions:
contents: read
pages: write
id-token: write
jobs:
setup:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set Environment Variables
uses: ./.github/actions/set-environment-variables
with:
environment: ${{ github.event.inputs.environment }}
env:
ADMIN_USER_PASSWORD: ${{secrets.ADMIN_USER_PASSWORD}}
test:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
- name: Setup pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: playwright-report/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Set GitHub Page URL
id: set-url
run: |
REPO_OWNER=$(echo "${{github.repository}}" | cut -d'/' -f1)
REPO_PATH=$(echo "${{github.repository}}" | cut -d'/' -f2)
echo "REPO_OWNER=$REPO_OWNER"
URL="https://$REPO_OWNER.github.io/$REPO_URL"
URL_Page="https://${{github.repository_owner}}.github.io/$REPO_PATH"
echo "URL=$URL_Page"