Update playwright-tests.yml #4
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 Tests | |
on: | |
push: | |
schedule: | |
- cron: '0 14 * * *' | |
jobs: | |
run-tests: | |
name: Run Playwright Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
with: | |
ref: main # Use the main branch here | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Create .env file from secrets | |
run: | | |
echo "CREDENTIALS={\"codioemail\":\"${{ secrets.CODIOEMAIL }}\",\"codiopass\":\"${{ secrets.CODIOPASS }}\"}" > .env | |
- name: Install Dependencies | |
run: npm install | |
- name: Install Browsers | |
run: npx playwright install | |
- name: Run Playwright Tests | |
run: npx playwright test | |
- name: Generate Allure Report | |
run: | | |
npm install -g allure-commandline | |
allure generate allure-results --clean -o allure-report | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./allure-report | |
branch: main # Ensure this is the branch you want to deploy to |