1 | name: Test old branches |
---|
2 | |
---|
3 | on: |
---|
4 | # Verify the workflow is successful when this file is updated. |
---|
5 | push: |
---|
6 | branches: |
---|
7 | - trunk |
---|
8 | paths: |
---|
9 | - '.github/workflows/test-old-branches.yml' |
---|
10 | # Run twice a month on the 1st and 15th at 00:00 UTC. |
---|
11 | schedule: |
---|
12 | - cron: '0 0 1 * *' |
---|
13 | - cron: '0 0 15 * *' |
---|
14 | |
---|
15 | # Disable permissions for all available scopes by default. |
---|
16 | # Any needed permissions should be configured at the job level. |
---|
17 | permissions: {} |
---|
18 | |
---|
19 | env: |
---|
20 | CURRENTLY_SUPPORTED_BRANCH: '6.6' |
---|
21 | |
---|
22 | jobs: |
---|
23 | dispatch-workflows-for-old-branches: |
---|
24 | name: ${{ matrix.workflow }} for ${{ matrix.branch }} |
---|
25 | runs-on: ubuntu-latest |
---|
26 | permissions: |
---|
27 | actions: write |
---|
28 | timeout-minutes: 20 |
---|
29 | if: ${{ github.repository == 'WordPress/wordpress-develop' }} |
---|
30 | strategy: |
---|
31 | fail-fast: false |
---|
32 | matrix: |
---|
33 | workflow: [ |
---|
34 | 'coding-standards.yml', |
---|
35 | 'javascript-tests.yml', |
---|
36 | 'phpunit-tests.yml', |
---|
37 | 'test-npm.yml' |
---|
38 | ] |
---|
39 | branch: [ |
---|
40 | '6.6', '6.5', '6.4', '6.3', '6.2', '6.1','6.0', |
---|
41 | '5.9', '5.8', '5.7', '5.6', '5.5', '5.4', '5.3', '5.2', '5.1', '5.0', |
---|
42 | '4.9', '4.8', '4.7', '4.6', '4.5', '4.4', '4.3', '4.2', '4.1' |
---|
43 | ] |
---|
44 | include: |
---|
45 | # PHP Compatibility testing was introduced in 5.5. |
---|
46 | - branch: '6.6' |
---|
47 | workflow: 'php-compatibility.yml' |
---|
48 | - branch: '6.5' |
---|
49 | workflow: 'php-compatibility.yml' |
---|
50 | - branch: '6.4' |
---|
51 | workflow: 'php-compatibility.yml' |
---|
52 | - branch: '6.3' |
---|
53 | workflow: 'php-compatibility.yml' |
---|
54 | - branch: '6.2' |
---|
55 | workflow: 'php-compatibility.yml' |
---|
56 | - branch: '6.1' |
---|
57 | workflow: 'php-compatibility.yml' |
---|
58 | - branch: '6.0' |
---|
59 | workflow: 'php-compatibility.yml' |
---|
60 | - branch: '5.9' |
---|
61 | workflow: 'php-compatibility.yml' |
---|
62 | - branch: '5.8' |
---|
63 | workflow: 'php-compatibility.yml' |
---|
64 | - branch: '5.7' |
---|
65 | workflow: 'php-compatibility.yml' |
---|
66 | - branch: '5.6' |
---|
67 | workflow: 'php-compatibility.yml' |
---|
68 | - branch: '5.5' |
---|
69 | workflow: 'php-compatibility.yml' |
---|
70 | |
---|
71 | # End-to-end testing was introduced in 5.3 but was later removed as there were no meaningful assertions. |
---|
72 | # Starting in 5.8 with #52905, some additional tests with real assertions were introduced. |
---|
73 | # Branches 5.8 and newer should be tested to confirm no regressions are introduced. |
---|
74 | - branch: '6.6' |
---|
75 | workflow: 'end-to-end-tests.yml' |
---|
76 | - branch: '6.5' |
---|
77 | workflow: 'end-to-end-tests.yml' |
---|
78 | - branch: '6.4' |
---|
79 | workflow: 'end-to-end-tests.yml' |
---|
80 | - branch: '6.3' |
---|
81 | workflow: 'end-to-end-tests.yml' |
---|
82 | - branch: '6.2' |
---|
83 | workflow: 'end-to-end-tests.yml' |
---|
84 | - branch: '6.1' |
---|
85 | workflow: 'end-to-end-tests.yml' |
---|
86 | - branch: '6.0' |
---|
87 | workflow: 'end-to-end-tests.yml' |
---|
88 | - branch: '5.9' |
---|
89 | workflow: 'end-to-end-tests.yml' |
---|
90 | - branch: '5.8' |
---|
91 | workflow: 'end-to-end-tests.yml' |
---|
92 | |
---|
93 | # Performance testing was introduced in 6.2. |
---|
94 | - branch: '6.6' |
---|
95 | workflow: 'performance.yml' |
---|
96 | - branch: '6.5' |
---|
97 | workflow: 'performance.yml' |
---|
98 | - branch: '6.4' |
---|
99 | workflow: 'performance.yml' |
---|
100 | - branch: '6.3' |
---|
101 | workflow: 'performance.yml' |
---|
102 | - branch: '6.2' |
---|
103 | workflow: 'performance.yml' |
---|
104 | |
---|
105 | # Build Process testing was introduced in 6.5. |
---|
106 | - branch: '6.5' |
---|
107 | workflow: 'test-build-processes.yml' |
---|
108 | |
---|
109 | # Run all branches monthly, but only the currently supported one twice per month. |
---|
110 | steps: |
---|
111 | - name: Dispatch workflow run |
---|
112 | uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 |
---|
113 | if: ${{ github.event_name == 'push' || github.event.schedule == '0 0 15 * *' || matrix.branch == env.CURRENTLY_SUPPORTED_BRANCH }} |
---|
114 | with: |
---|
115 | retries: 2 |
---|
116 | retry-exempt-status-codes: 418 |
---|
117 | script: | |
---|
118 | github.rest.actions.createWorkflowDispatch({ |
---|
119 | owner: context.repo.owner, |
---|
120 | repo: context.repo.repo, |
---|
121 | workflow_id: '${{ matrix.workflow }}', |
---|
122 | ref: '${{ matrix.branch }}' |
---|
123 | }); |
---|
124 | |
---|
125 | slack-notifications: |
---|
126 | name: Slack Notifications |
---|
127 | uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk |
---|
128 | permissions: |
---|
129 | actions: read |
---|
130 | contents: read |
---|
131 | needs: [ dispatch-workflows-for-old-branches ] |
---|
132 | if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} |
---|
133 | with: |
---|
134 | calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }} |
---|
135 | secrets: |
---|
136 | SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} |
---|
137 | SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }} |
---|
138 | SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} |
---|
139 | SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} |
---|