|
4 | 4 | # allow running manually
|
5 | 5 | workflow_dispatch:
|
6 | 6 | pull_request:
|
7 |
| - branches: [ 'master', 'stable-*', 'feature/*' ] |
| 7 | + branches: [ 'main', 'stable-*', 'feature/*' ] |
8 | 8 | push:
|
9 |
| - branches: [ 'master', 'stable-*', 'feature/*' ] |
10 |
| - # daily on master |
| 9 | + branches: [ 'main', 'stable-*', 'feature/*' ] |
| 10 | + # weekly on stable-4.7 |
11 | 11 | schedule:
|
12 |
| - - cron: '30 5 * * *' |
| 12 | + - cron: '30 5 * * 1' |
13 | 13 |
|
14 | 14 | concurrency:
|
15 | 15 | group: cypress-${{ github.ref }}
|
|
19 | 19 | cypress:
|
20 | 20 | runs-on: ubuntu-latest
|
21 | 21 | env:
|
22 |
| - # base of a PR, or pushed-to branch outside PRs, or master |
23 |
| - BRANCH: ${{ github.base_ref || github.ref || 'refs/heads/master' }} |
| 22 | + # base of a PR, or pushed-to branch outside PRs, or stable-4.7 |
| 23 | + BRANCH: ${{ github.base_ref || github.ref || 'refs/heads/stable-4.7' }} |
24 | 24 |
|
25 | 25 | strategy:
|
26 | 26 | fail-fast: false
|
|
55 | 55 | - name: "Set variables for screenshots"
|
56 | 56 | if: matrix.test == 'screenshots'
|
57 | 57 | run: |
|
58 |
| - UI_COMMIT_MASTER=`curl -s https://api.github.com/repos/ansible/ansible-hub-ui/branches/${SHORT_BRANCH} | jq -r .commit.sha` |
59 |
| - echo "UI_COMMIT_MASTER=${UI_COMMIT_MASTER}" >> $GITHUB_ENV |
| 58 | + UI_COMMIT_MAIN=`curl -s https://api.github.com/repos/ansible/ansible-hub-ui/branches/${SHORT_BRANCH} | jq -r .commit.sha` |
| 59 | + echo "UI_COMMIT_MAIN=${UI_COMMIT_MAIN}" >> $GITHUB_ENV |
60 | 60 |
|
61 | 61 | COMPARE_SCREENSHOTS=${{ github.event_name == 'pull_request' }}
|
62 | 62 | echo 'compare screenshots:'
|
@@ -182,12 +182,12 @@ jobs:
|
182 | 182 | run: |
|
183 | 183 | diff -Naur <(ls test/cypress/e2e) <(yq '.jobs.cypress.strategy.matrix.test[]' .github/workflows/cypress.yml | sort)
|
184 | 184 |
|
185 |
| - - name: "Cache master screenshots" |
| 185 | + - name: "Cache original screenshots" |
186 | 186 | if: matrix.test == 'screenshots'
|
187 | 187 | uses: actions/cache@v3
|
188 | 188 | with:
|
189 | 189 | path: ansible-hub-ui/test/screenshots-main/
|
190 |
| - key: screenshots-${{env.SHORT_BRANCH}}-${{ env.UI_COMMIT_MASTER }} |
| 190 | + key: screenshots-${{env.SHORT_BRANCH}}-${{ env.UI_COMMIT_MAIN }} |
191 | 191 | restore-keys: |
|
192 | 192 | screenshots-${{env.SHORT_BRANCH}}-
|
193 | 193 |
|
@@ -238,7 +238,7 @@ jobs:
|
238 | 238 | exit 1
|
239 | 239 | fi
|
240 | 240 |
|
241 |
| - - name: "Move Cache master screenshots" |
| 241 | + - name: "Move cached screenshots" |
242 | 242 | if: ${{ matrix.test == 'screenshots' && env.COMPARE_SCREENSHOTS == 'false' }}
|
243 | 243 | working-directory: 'ansible-hub-ui/test'
|
244 | 244 | run: |
|
|
0 commit comments