Skip to content

Commit e63520f

Browse files
authored
[stable-4.7] Rename master to main in workflows and docs (#4122)
* Rename master to main in workflows and docs and sometimes to stable-4.7 when it makes sense to prefer over main No-Issue * fix cypress cron branch, interval
1 parent e26ea98 commit e63520f

File tree

5 files changed

+15
-35
lines changed

5 files changed

+15
-35
lines changed

.github/workflows/automerge.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Automerge
22

33
on:
44
pull_request_target:
5-
branches: [ 'master', 'stable-*', 'feature/*' ]
5+
branches: [ 'main', 'stable-*', 'feature/*' ]
66

77
jobs:
88
automerge:

.github/workflows/cypress.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ on:
44
# allow running manually
55
workflow_dispatch:
66
pull_request:
7-
branches: [ 'master', 'stable-*', 'feature/*' ]
7+
branches: [ 'main', 'stable-*', 'feature/*' ]
88
push:
9-
branches: [ 'master', 'stable-*', 'feature/*' ]
10-
# daily on master
9+
branches: [ 'main', 'stable-*', 'feature/*' ]
10+
# weekly on stable-4.7
1111
schedule:
12-
- cron: '30 5 * * *'
12+
- cron: '30 5 * * 1'
1313

1414
concurrency:
1515
group: cypress-${{ github.ref }}
@@ -19,8 +19,8 @@ jobs:
1919
cypress:
2020
runs-on: ubuntu-latest
2121
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' }}
2424

2525
strategy:
2626
fail-fast: false
@@ -55,8 +55,8 @@ jobs:
5555
- name: "Set variables for screenshots"
5656
if: matrix.test == 'screenshots'
5757
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
6060
6161
COMPARE_SCREENSHOTS=${{ github.event_name == 'pull_request' }}
6262
echo 'compare screenshots:'
@@ -182,12 +182,12 @@ jobs:
182182
run: |
183183
diff -Naur <(ls test/cypress/e2e) <(yq '.jobs.cypress.strategy.matrix.test[]' .github/workflows/cypress.yml | sort)
184184
185-
- name: "Cache master screenshots"
185+
- name: "Cache original screenshots"
186186
if: matrix.test == 'screenshots'
187187
uses: actions/cache@v3
188188
with:
189189
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 }}
191191
restore-keys: |
192192
screenshots-${{env.SHORT_BRANCH}}-
193193
@@ -238,7 +238,7 @@ jobs:
238238
exit 1
239239
fi
240240
241-
- name: "Move Cache master screenshots"
241+
- name: "Move cached screenshots"
242242
if: ${{ matrix.test == 'screenshots' && env.COMPARE_SCREENSHOTS == 'false' }}
243243
working-directory: 'ansible-hub-ui/test'
244244
run: |

.github/workflows/pr-checks.yml

+1-21
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,10 @@ name: "PR checks"
22

33
on:
44
pull_request:
5-
branches: [ 'master', 'stable-*', 'feature/*' ]
5+
branches: [ 'main', 'stable-*', 'feature/*' ]
66

77
jobs:
88

9-
check_commit:
10-
runs-on: ubuntu-latest
11-
if: ${{ github.base_ref == 'master' }}
12-
steps:
13-
14-
- name: Checkout code
15-
uses: actions/checkout@v3
16-
with:
17-
ref: ${{ github.event.after }} # for PR avoids checking out merge commit
18-
fetch-depth: 0 # include all history
19-
20-
- name: Run script to validate commits for both pull request and a push
21-
env:
22-
GITHUB_PR_COMMITS_URL: ${{ github.event.pull_request.commits_url }}
23-
GITHUB_USER: ${{ github.event.pull_request.user.login }}
24-
START_COMMIT: ${{ github.event.before }}
25-
END_COMMIT: ${{ github.event.after }}
26-
run: |
27-
curl https://raw.githubusercontent.com/ansible/galaxy_ng/master/.ci/scripts/validate_commit_message_custom.py | python
28-
299
pr-checks:
3010
runs-on: ubuntu-latest
3111
steps:

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ The app will run on http://localhost:8002/ui and proxy requests for `/api/automa
2929

3030
## UI Testing
3131

32-
For more information about UI testing go to [test README](https://github.com/ansible/ansible-hub-ui/tree/master/test/README.md).
32+
For more information about UI testing go to [test README](https://github.com/ansible/ansible-hub-ui/tree/stable-4.7/test/README.md).

test/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ name like `$collection-form.js`
158158
name like `$collection-$action.js` (using camel\_case for both collection name and action name)
159159

160160
* test the action on each available screen
161-
* prefer to loop the same test over an array of "get me there" functions (see [`execution_environments_use_in_controller.js`](https://github.com/ansible/ansible-hub-ui/blob/master/test/cypress/integration/execution_environments_use_in_controller.js#L53-L83) for an example)
161+
* prefer to loop the same test over an array of "get me there" functions (see [`execution_environments_use_in_controller.js`](https://github.com/ansible/ansible-hub-ui/blob/stable-4.7/test/cypress/integration/execution_environments_use_in_controller.js#L53-L83) for an example)
162162
* make sure to wait until every request associated with submitting that action ends, including tasks, and subsequent list screen reloads
163163

164164
## GalaxyKit Integration

0 commit comments

Comments
 (0)