Playwright Tests on Release #6
This file contains hidden or 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: | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| version: "0.4.27" | |
| enable-cache: true | |
| cache-dependency-glob: "requirements**.txt" | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12.7' | |
| - name: Install dependencies | |
| run: | | |
| uv pip install --system -r requirements.txt | |
| - name: Ensure browsers are installed | |
| run: uv pip install --system playwright && python -m playwright install --with-deps | |
| - name: Set environment for Release | |
| run: | | |
| echo "BASE_URL=https://release-gs.qa-playground.com/api/v1/" >> $GITHUB_ENV | |
| - name: Set API Token for Release | |
| run: echo "API_TOKEN=${{ secrets.API_TOKEN }}" >> $GITHUB_ENV | |
| - name: Run your tests | |
| run: | | |
| mkdir -p test-results | |
| pytest --alluredir=allure-results | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: allure-results | |
| path: allure-results | |
| retention-days: 20 | |
| - name: Get Allure history | |
| uses: actions/[email protected] | |
| if: always() | |
| continue-on-error: true | |
| with: | |
| ref: gh-pages | |
| path: gh-pages | |
| - name: Allure Report action from marketplace | |
| uses: simple-elf/[email protected] | |
| if: always() | |
| with: | |
| allure_results: allure-results | |
| allure_history: allure-history | |
| keep_reports: 20 | |
| - name: Deploy report to Github Pages | |
| if: always() | |
| uses: peaceiris/actions-gh-pages@v2 | |
| env: | |
| PERSONAL_TOKEN: ${{ secrets.HACK }} | |
| PUBLISH_BRANCH: gh-pages | |
| PUBLISH_DIR: allure-history |