Skip to content

Commit 7f76051

Browse files
AntonyAntony
authored andcommitted
chore(ci): add skeleton for nightly E2E matrix workflow\n\nSigned-off-by: Anton T. <[email protected]>
1 parent 75ae7a0 commit 7f76051

File tree

1 file changed

+84
-6
lines changed

1 file changed

+84
-6
lines changed

.github/workflows/e2e-matrix.yml

Lines changed: 84 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,101 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: E2E Matrix Tests (bootstrap)
15+
name: E2E Matrix Tests (Skeleton)
1616

1717
on:
18+
push:
19+
branches:
20+
- chore/ci/e2e-matrix-skeleton
1821
pull_request:
1922
types: [opened, reopened, synchronize, labeled, unlabeled]
2023
branches:
2124
- main
22-
- feat/ci-e2e-matrix
25+
- chore/ci/e2e-matrix-skeleton
26+
schedule:
27+
- cron: "30 2 * * *"
2328
workflow_dispatch:
29+
inputs:
30+
profiles:
31+
description: "Storage profiles (comma-separated): sds, cephrbd"
32+
required: false
33+
default: "sds,cephrbd"
34+
timeout:
35+
description: "Ginkgo timeout (e.g. 2h, 4h)"
36+
required: false
37+
default: "4h"
2438

2539
permissions:
2640
contents: read
2741

2842
jobs:
29-
noop:
30-
name: Bootstrap
43+
setup:
44+
name: Setup (skeleton)
45+
runs-on: ubuntu-latest
46+
outputs:
47+
profiles: ${{ steps.profiles.outputs.profiles }}
48+
steps:
49+
- uses: actions/checkout@v4
50+
51+
- name: Parse profiles input to JSON
52+
id: profiles
53+
run: |
54+
set -euo pipefail
55+
PROFILES_CSV="${{ inputs.profiles || 'sds,cephrbd' }}"
56+
# Convert CSV to JSON array without external deps
57+
JSON="[$(awk -v csv="$PROFILES_CSV" 'BEGIN{n=split(csv, a, /,/); for(i=1;i<=n;i++){gsub(/^ +| +$/,"",a[i]); printf "%s\"%s\"", (i>1?",":""), a[i]}}')]"
58+
echo "profiles=$JSON" >> "$GITHUB_OUTPUT"
59+
60+
- name: Echo planned matrix
61+
run: |
62+
echo "Matrix profiles: ${{ steps.profiles.outputs.profiles }}"
63+
64+
prepare:
65+
name: Prepare (${{ matrix.profile }}) [skeleton]
66+
needs: [setup]
67+
runs-on: ubuntu-latest
68+
concurrency:
69+
group: prepare-${{ github.ref }}-${{ matrix.profile }}
70+
cancel-in-progress: true
71+
strategy:
72+
fail-fast: false
73+
matrix:
74+
profile: ${{ fromJson(needs.setup.outputs.profiles) }}
75+
steps:
76+
- name: Echo prepare
77+
run: |
78+
echo "Prepare stage for profile=${{ matrix.profile }}"
79+
80+
run-e2e:
81+
name: E2E (${{ matrix.profile }}) [skeleton]
82+
needs: [setup, prepare]
83+
runs-on: ubuntu-latest
84+
concurrency:
85+
group: e2e-${{ github.ref }}-${{ matrix.profile }}
86+
cancel-in-progress: true
87+
strategy:
88+
fail-fast: false
89+
matrix:
90+
profile: ${{ fromJson(needs.setup.outputs.profiles) }}
91+
steps:
92+
- name: Echo run
93+
run: |
94+
report:
95+
name: Report [skeleton]
96+
needs: [setup, run-e2e]
97+
if: always()
98+
runs-on: ubuntu-latest
99+
steps:
100+
- name: Echo report
101+
run: |
102+
echo "Report stage (skeleton). Collecting results from matrix..."
103+
104+
cleanup:
105+
name: Cleanup [skeleton]
106+
needs: report
107+
if: always()
31108
runs-on: ubuntu-latest
32109
steps:
33-
- name: Say hello
34-
run: echo "Bootstrap workflow OK"
110+
- name: Echo cleanup
111+
run: |
112+
echo "Cleanup stage (skeleton). Nothing to do."

0 commit comments

Comments
 (0)