|
| 1 | +name: E2E Book Samples |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + paths: |
| 6 | + - 'docs/book/src/getting-started/testdata/project/**' |
| 7 | + - 'docs/book/src/cronjob-tutorial/testdata/project/**' |
| 8 | + - 'docs/book/src/multiversion-tutorial/testdata/project/**' |
| 9 | + - '.github/workflows/test-e2e-book.yml' |
| 10 | + pull_request: |
| 11 | + paths: |
| 12 | + - 'docs/book/src/getting-started/testdata/project/**' |
| 13 | + - 'docs/book/src/cronjob-tutorial/testdata/project/**' |
| 14 | + - 'docs/book/src/multiversion-tutorial/testdata/project/**' |
| 15 | + - '.github/workflows/test-e2e-book.yml' |
| 16 | + |
| 17 | +jobs: |
| 18 | + e2e-getting-started: |
| 19 | + runs-on: ubuntu-latest |
| 20 | + strategy: |
| 21 | + fail-fast: true |
| 22 | + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository |
| 23 | + steps: |
| 24 | + - name: Checkout repository |
| 25 | + uses: actions/checkout@v4 |
| 26 | + |
| 27 | + - name: Setup Go |
| 28 | + uses: actions/setup-go@v5 |
| 29 | + with: |
| 30 | + go-version: '~1.22' |
| 31 | + |
| 32 | + - name: Install the latest version of kind |
| 33 | + run: | |
| 34 | + curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64 |
| 35 | + chmod +x ./kind |
| 36 | + sudo mv ./kind /usr/local/bin/kind |
| 37 | +
|
| 38 | + - name: Verify kind installation |
| 39 | + run: kind version |
| 40 | + |
| 41 | + - name: Create kind cluster |
| 42 | + run: kind create cluster |
| 43 | + |
| 44 | + - name: Running make test-e2e for Getting Started tutorial sample |
| 45 | + working-directory: docs/book/src/getting-started/testdata/project |
| 46 | + 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: '~1.22' |
| 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: '~1.22' |
| 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