|
1 | | -name: Nightly regression tests |
| 1 | +name: Nightly Regression Tests |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | schedule: |
@@ -48,75 +48,37 @@ jobs: |
48 | 48 | with: |
49 | 49 | virtualenvs-create: true |
50 | 50 | virtualenvs-in-project: true |
51 | | - virtualenvs-path: .venv |
52 | 51 | installer-parallel: true |
53 | | - - name: Load cached venv |
54 | | - id: cached-poetry-dependencies |
| 52 | + - name: Cache Dependencies |
55 | 53 | uses: actions/cache@v4 |
| 54 | + id: poetry-cache |
56 | 55 | with: |
57 | 56 | path: .venv |
58 | | - key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} |
| 57 | + key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} |
59 | 58 | - name: Install Dependencies |
60 | | - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' |
| 59 | + if: steps.poetry-cache.outputs.cache-hit != 'true' |
61 | 60 | run: poetry install --no-interaction --no-root |
62 | 61 | - name: Run Tests |
63 | 62 | run: | |
64 | | - source .venv/bin/activate |
65 | | - xvfb-run pytest ${{ github.event.inputs.pytest_command || '-m "not devRun"' }} \ |
| 63 | + poetry run xvfb-run pytest ${{ github.event.inputs.pytest_command || '-m "not devRun"' }} \ |
66 | 64 | --base-url ${{ vars.BASE_URL }} \ |
67 | 65 | --splits ${{ github.event.inputs.parallelism || 2 }} \ |
68 | 66 | --group ${{ matrix.group }} |
69 | | - - name: Upload test results |
| 67 | + - name: Upload Test Results |
70 | 68 | if: always() |
71 | | - uses: actions/upload-artifact@v4.6.1 |
| 69 | + uses: actions/upload-artifact@v4 |
72 | 70 | with: |
73 | | - name: test-results-${{ matrix.group }} |
74 | | - path: | |
75 | | - test-results/ |
76 | | - allure-results |
| 71 | + name: allure-results-${{ matrix.group }} |
| 72 | + path: allure-results |
77 | 73 | retention-days: 7 |
78 | 74 |
|
79 | 75 | merge-reports: |
80 | 76 | needs: nightly-test |
81 | 77 | if: always() |
82 | 78 | runs-on: ubuntu-latest |
83 | 79 | steps: |
84 | | - - uses: actions/checkout@v4 |
85 | | - - name: Download all test results |
86 | | - uses: actions/download-artifact@v4 |
87 | | - with: |
88 | | - path: artifacts |
89 | | - - name: Merge Allure Results |
90 | | - run: | |
91 | | - mkdir -p allure-results |
92 | | - for dir in artifacts/test-results-*/allure-results; do |
93 | | - cp -r $dir/* allure-results/ |
94 | | - done |
95 | | - - name: Link Git Information And Browser Version To Allure Report |
96 | | - working-directory: allure-results |
97 | | - if: always() |
98 | | - run: | |
99 | | - { |
100 | | - echo BUILD_URL=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
101 | | - echo GIT_BRANCH=${{ github.head_ref || github.ref_name }} |
102 | | - echo GIT_COMMIT_ID=${{ github.sha }} |
103 | | - echo GIT_COMMIT_MESSAGE=$(git show -s --format=%s HEAD) |
104 | | - echo GIT_COMMIT_AUTHOR_NAME=$(git show -s --format='%ae' HEAD) |
105 | | - echo GIT_COMMIT_TIME=$(git show -s --format=%ci HEAD) |
106 | | - echo CHROME_VERSION=$(google-chrome --product-version) |
107 | | - } >> environment.properties |
108 | | - - name: Generate Allure Report |
109 | | - uses: simple-elf/allure-report-action@master |
110 | | - if: always() |
111 | | - id: allure-report |
112 | | - with: |
113 | | - allure_results: allure-results |
114 | | - allure_report: allure-report |
115 | | - gh_pages: gh-pages |
116 | | - allure_history: allure-history |
117 | | - - name: Deploy Report To Github Pages |
118 | | - if: always() |
119 | | - uses: peaceiris/actions-gh-pages@v4 |
| 80 | + - name: Merge and Publish Allure Report |
| 81 | + uses: Valiantsin2021/allure-shard-results-publish@1.0.6 |
120 | 82 | with: |
121 | | - github_token: ${{ secrets.GITHUB_TOKEN }} |
122 | | - publish_dir: allure-history |
| 83 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 84 | + add-env: 'true' |
0 commit comments