|
12 | 12 | # See the License for the specific language governing permissions and |
13 | 13 | # limitations under the License. |
14 | 14 |
|
15 | | -name: E2E Matrix Tests (bootstrap) |
| 15 | +name: E2E Matrix Tests (Skeleton) |
16 | 16 |
|
17 | 17 | on: |
| 18 | + push: |
| 19 | + branches: |
| 20 | + - chore/ci/e2e-matrix-skeleton |
18 | 21 | pull_request: |
19 | 22 | types: [opened, reopened, synchronize, labeled, unlabeled] |
20 | 23 | branches: |
21 | 24 | - main |
22 | | - - feat/ci-e2e-matrix |
| 25 | + - chore/ci/e2e-matrix-skeleton |
| 26 | + schedule: |
| 27 | + - cron: "30 2 * * *" |
23 | 28 | 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" |
24 | 38 |
|
25 | 39 | permissions: |
26 | 40 | contents: read |
27 | 41 |
|
28 | 42 | 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() |
31 | 108 | runs-on: ubuntu-latest |
32 | 109 | 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