diff --git a/.github/workflows/run_release.yml b/.github/workflows/run_release.yml index bc73e11..5114771 100644 --- a/.github/workflows/run_release.yml +++ b/.github/workflows/run_release.yml @@ -1,72 +1,75 @@ ---- - name: Playwright Tests +name: Playwright Tests on Release - on: - workflow_dispatch: +on: + workflow_dispatch: - jobs: - test: - timeout-minutes: 60 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 +jobs: + test-release: + name: Run tests on Release environment + 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: 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: 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: 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: 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 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: Set API Token for Release + run: echo "API_TOKEN=${{ secrets.API_TOKEN }}" >> $GITHUB_ENV - - name: Run your tests - run: | - pytest --alluredir=allure-results || true - continue-on-error: true - - uses: actions/upload-artifact@v4 - with: - name: allure-results - path: allure-results - retention-days: 20 - - name: Get Allure history - uses: actions/checkout@v4.1.1 - if: always() - continue-on-error: true - with: - ref: gh-pages - path: gh-pages + - name: Run tests for Release + run: | + pytest --alluredir=allure-results || true + continue-on-error: true # Ensures job continues even if tests fail - - name: Allure Report action from marketplace - uses: simple-elf/allure-report-action@v1.9 - if: always() - with: - allure_results: allure-results - allure_history: allure-history - keep_reports: 20 + - uses: actions/upload-artifact@v4 + with: + name: allure-results + path: allure-results + retention-days: 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 + - name: Get Allure history + uses: actions/checkout@v4.1.1 + if: always() + continue-on-error: true + with: + ref: gh-pages + path: gh-pages + + - name: Allure Report action from marketplace + uses: simple-elf/allure-report-action@v1.9 + 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