|
78 | 78 | path: envtest-existing.coverage.gz
|
79 | 79 | retention-days: 1
|
80 | 80 |
|
| 81 | + kuttl-k3d: |
| 82 | + runs-on: ubuntu-latest |
| 83 | + needs: [go-test] |
| 84 | + strategy: |
| 85 | + fail-fast: false |
| 86 | + matrix: |
| 87 | + kubernetes: [latest] |
| 88 | + steps: |
| 89 | + - uses: actions/checkout@v3 |
| 90 | + - uses: actions/setup-go@v3 |
| 91 | + with: { go-version: 1.x } |
| 92 | + |
| 93 | + - name: Start k3s |
| 94 | + uses: ./.github/actions/k3d |
| 95 | + with: |
| 96 | + k3s-channel: "${{ matrix.kubernetes }}" |
| 97 | + prefetch-images: | |
| 98 | + registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi8-4.30-2 |
| 99 | + registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.38-2 |
| 100 | + registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi8-1.16-4 |
| 101 | + registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-14.4-0 |
| 102 | + registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-14.4-3.1-0 |
| 103 | +
|
| 104 | + - run: go mod download |
| 105 | + - name: Build PGO |
| 106 | + run: | |
| 107 | + make build-postgres-operator PGO_VERSION=${{ github.sha }} |
| 108 | +
|
| 109 | + # Start a Docker container with the working directory mounted. |
| 110 | + - name: Start PGO |
| 111 | + run: | |
| 112 | + kubectl apply -k ./config/namespace; kubectl apply -k ./config/dev |
| 113 | + hack/create-kubeconfig.sh postgres-operator pgo |
| 114 | +
|
| 115 | + docker run --detach --network host --read-only \ |
| 116 | + --volume "$(pwd):/mnt" --workdir '/mnt' --env 'PATH=/mnt/bin' \ |
| 117 | + --env 'KUBECONFIG=hack/.kube/postgres-operator/pgo' \ |
| 118 | + --env 'RELATED_IMAGE_PGADMIN=registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi8-4.30-2' \ |
| 119 | + --env 'RELATED_IMAGE_PGBACKREST=registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.38-2' \ |
| 120 | + --env 'RELATED_IMAGE_PGBOUNCER=registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi8-1.16-4' \ |
| 121 | + --env 'RELATED_IMAGE_POSTGRES_14=registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-14.4-0' \ |
| 122 | + --env 'RELATED_IMAGE_POSTGRES_14_GIS_3.1=registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-14.4-3.1-0' \ |
| 123 | + --name 'postgres-operator' ubuntu \ |
| 124 | + postgres-operator |
| 125 | +
|
| 126 | + - run: make tools/kuttl |
| 127 | + - run: make generate-kuttl |
| 128 | + env: |
| 129 | + KUTTL_PG_VERSION: '14' |
| 130 | + KUTTL_POSTGIS_VERSION: '3.1' |
| 131 | + KUTTL_PSQL_IMAGE: 'registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-14.4-0' |
| 132 | + - run: | |
| 133 | + make check-kuttl && exit |
| 134 | + failed=$? |
| 135 | + echo '::group::PGO logs'; docker logs 'postgres-operator'; echo '::endgroup::' |
| 136 | + exit $failed |
| 137 | +
|
81 | 138 | coverage-report:
|
82 | 139 | if: ${{ success() || contains(needs.*.result, 'success') }}
|
83 | 140 | runs-on: ubuntu-latest
|
|
0 commit comments