update report #38
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: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- 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: Install Allure CLI | |
run: npm install -g allure-commandline --save-dev | |
- name: Build application | |
run: npm run build | |
- name: Start application | |
run: npm start & | |
- name: Wait for localhost to be ready | |
run: npx wait-on http://localhost:3000 | |
- name: Run Playwright tests | |
run: npx playwright test | |
- name: Deploy Allure Report to GitHub Pages | |
if: ${{ success() }} | |
run: | | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "[email protected]" | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git | |
git fetch origin | |
git checkout gh-pages || git checkout --orphan gh-pages | |
rm -rf * | |
cp -r allure-report/* . | |
git add . | |
git commit -m "Update Allure Report" | |
git push origin gh-pages --force |