Skip to content

Commit 18ef6dd

Browse files
author
Mateus Oliveira
authored
🌱: simplify E2E Book Samples job (#4469)
fix: simplify E2E Book Samples job Signed-off-by: Mateus Oliveira <[email protected]>
1 parent 18df538 commit 18ef6dd

File tree

1 file changed

+9
-64
lines changed

1 file changed

+9
-64
lines changed

.github/workflows/test-e2e-book.yml

Lines changed: 9 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@ on:
1515
- '.github/workflows/test-e2e-book.yml'
1616

1717
jobs:
18-
e2e-getting-started:
18+
e2e:
1919
runs-on: ubuntu-latest
2020
strategy:
2121
fail-fast: true
22+
matrix:
23+
folder: [
24+
"docs/book/src/getting-started/testdata/project",
25+
"docs/book/src/cronjob-tutorial/testdata/project",
26+
"docs/book/src/multiversion-tutorial/testdata/project"
27+
]
2228
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
2329
steps:
2430
- name: Checkout repository
@@ -41,67 +47,6 @@ jobs:
4147
- name: Create kind cluster
4248
run: kind create cluster
4349

44-
- name: Running make test-e2e for Getting Started tutorial sample
45-
working-directory: docs/book/src/getting-started/testdata/project
50+
- name: Running make test-e2e for ${{ matrix.folder }}
51+
working-directory: ${{ matrix.folder }}
4652
run: make test-e2e
47-
48-
e2e-cronjob-tutorial:
49-
runs-on: ubuntu-latest
50-
strategy:
51-
fail-fast: true
52-
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
53-
steps:
54-
- name: Checkout repository
55-
uses: actions/checkout@v4
56-
57-
- name: Setup Go
58-
uses: actions/setup-go@v5
59-
with:
60-
go-version-file: go.mod
61-
62-
- name: Install the latest version of kind
63-
run: |
64-
curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64
65-
chmod +x ./kind
66-
sudo mv ./kind /usr/local/bin/kind
67-
68-
- name: Verify kind installation
69-
run: kind version
70-
71-
- name: Create kind cluster
72-
run: kind create cluster
73-
74-
- name: Running make test-e2e for Cronjob tutorial sample
75-
working-directory: docs/book/src/cronjob-tutorial/testdata/project
76-
run: make test-e2e
77-
78-
e2e-multiversion-tutorial:
79-
runs-on: ubuntu-latest
80-
strategy:
81-
fail-fast: true
82-
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
83-
steps:
84-
- name: Checkout repository
85-
uses: actions/checkout@v4
86-
87-
- name: Setup Go
88-
uses: actions/setup-go@v5
89-
with:
90-
go-version-file: go.mod
91-
92-
- name: Install the latest version of kind
93-
run: |
94-
curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64
95-
chmod +x ./kind
96-
sudo mv ./kind /usr/local/bin/kind
97-
98-
- name: Verify kind installation
99-
run: kind version
100-
101-
- name: Create kind cluster
102-
run: kind create cluster
103-
104-
- name: Running make test-e2e for Multiversion tutorial sample
105-
working-directory: docs/book/src/multiversion-tutorial/testdata/project
106-
run: make test-e2e
107-

0 commit comments

Comments
 (0)