Skip to content

Commit f98a7f3

Browse files
author
Kirill Fuks
committed
chore: api tests 1.28
1 parent d5b8fca commit f98a7f3

File tree

1 file changed

+88
-88
lines changed

1 file changed

+88
-88
lines changed

.github/workflows/test.yaml

Lines changed: 88 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -41,48 +41,14 @@ jobs:
4141
# path: envtest.coverage.gz
4242
# retention-days: 1
4343

44-
# kubernetes-k3d:
45-
# if: "${{ github.repository == 'CrunchyData/postgres-operator' }}"
46-
# runs-on: ubuntu-20.04
47-
# needs: [go-test]
48-
# strategy:
49-
# fail-fast: false
50-
# matrix:
51-
# kubernetes: [v1.27, v1.24]
52-
# steps:
53-
# - uses: actions/checkout@v3
54-
# - uses: actions/setup-go@v3
55-
# with: { go-version: 1.x }
56-
57-
# - name: Start k3s
58-
# uses: ./.github/actions/k3d
59-
# with:
60-
# k3s-channel: "${{ matrix.kubernetes }}"
61-
# prefetch-images: |
62-
# registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.45-3
63-
# registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi8-1.19-3
64-
# registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-14.8-3
65-
66-
# - run: make createnamespaces check-envtest-existing
67-
# env:
68-
# PGO_TEST_TIMEOUT_SCALE: 1.2
69-
# GO_TEST: go test --coverprofile 'envtest-existing.coverage' --coverpkg ./internal/...
70-
71-
# # Upload coverage to GitHub
72-
# - run: gzip envtest-existing.coverage
73-
# - uses: actions/upload-artifact@v3
74-
# with:
75-
# name: "kubernetes-k3d=${{ matrix.kubernetes }}"
76-
# path: envtest-existing.coverage.gz
77-
# retention-days: 1
78-
79-
kuttl-k3d:
44+
kubernetes-k3d:
45+
# if: "${{ github.repository == 'CrunchyData/postgres-operator' }}"
8046
runs-on: ubuntu-20.04
8147
# needs: [go-test]
8248
strategy:
8349
fail-fast: false
8450
matrix:
85-
kubernetes: [v1.27, testing]
51+
kubernetes: [v1.27, latest]
8652
steps:
8753
- uses: actions/checkout@v3
8854
- uses: actions/setup-go@v3
@@ -93,61 +59,95 @@ jobs:
9359
with:
9460
k3s-channel: "${{ matrix.kubernetes }}"
9561
prefetch-images: |
96-
registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi8-4.30-16
9762
registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.45-3
9863
registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi8-1.19-3
99-
registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:latest
100-
registry.developers.crunchydata.com/crunchydata/crunchy-upgrade:latest
10164
registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-14.8-3
102-
registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-14.8-3.1-3
103-
registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-15.3-3
104-
registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-15.3-3.3-3
105-
- run: go mod download
106-
- name: Build executable
107-
run: PGO_VERSION='${{ github.sha }}' make build-postgres-operator
108-
109-
# Start a Docker container with the working directory mounted.
110-
- name: Start PGO
111-
run: |
112-
kubectl apply --server-side -k ./config/namespace
113-
kubectl apply --server-side -k ./config/dev
114-
hack/create-kubeconfig.sh postgres-operator pgo
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-16' \
119-
--env 'RELATED_IMAGE_PGBACKREST=registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.45-3' \
120-
--env 'RELATED_IMAGE_PGBOUNCER=registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi8-1.19-3' \
121-
--env 'RELATED_IMAGE_PGEXPORTER=registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:latest' \
122-
--env 'RELATED_IMAGE_PGUPGRADE=registry.developers.crunchydata.com/crunchydata/crunchy-upgrade:latest' \
123-
--env 'RELATED_IMAGE_POSTGRES_14=registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-14.8-3' \
124-
--env 'RELATED_IMAGE_POSTGRES_14_GIS_3.1=registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-14.8-3.1-3' \
125-
--env 'RELATED_IMAGE_POSTGRES_15=registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-15.3-3' \
126-
--env 'RELATED_IMAGE_POSTGRES_15_GIS_3.3=registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-15.3-3.3-3' \
127-
--env 'PGO_FEATURE_GATES=TablespaceVolumes=true' \
128-
--name 'postgres-operator' ubuntu \
129-
postgres-operator
130-
- name: Install kuttl
131-
run: |
132-
curl -Lo /usr/local/bin/kubectl-kuttl https://github.com/kudobuilder/kuttl/releases/download/v0.13.0/kubectl-kuttl_0.13.0_linux_x86_64
133-
chmod +x /usr/local/bin/kubectl-kuttl
134-
135-
- run: make generate-kuttl
136-
env:
137-
KUTTL_PG_UPGRADE_FROM_VERSION: '14'
138-
KUTTL_PG_UPGRADE_TO_VERSION: '15'
139-
KUTTL_PG_VERSION: '14'
140-
KUTTL_POSTGIS_VERSION: '3.1'
141-
KUTTL_PSQL_IMAGE: 'registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-14.8-3'
142-
- run: |
143-
make check-kuttl && exit
144-
failed=$?
145-
echo '::group::PGO logs'; docker logs 'postgres-operator'; echo '::endgroup::'
146-
exit $failed
65+
66+
- run: make createnamespaces check-envtest-existing
14767
env:
148-
KUTTL_TEST: kubectl-kuttl test
149-
- name: Stop PGO
150-
run: docker stop 'postgres-operator' || true
68+
PGO_TEST_TIMEOUT_SCALE: 1.2
69+
GO_TEST: go test --coverprofile 'envtest-existing.coverage' --coverpkg ./internal/...
70+
71+
# Upload coverage to GitHub
72+
# - run: gzip envtest-existing.coverage
73+
# - uses: actions/upload-artifact@v3
74+
# with:
75+
# name: "kubernetes-k3d=${{ matrix.kubernetes }}"
76+
# path: envtest-existing.coverage.gz
77+
# retention-days: 1
78+
79+
# kuttl-k3d:
80+
# runs-on: ubuntu-20.04
81+
# # needs: [go-test]
82+
# strategy:
83+
# fail-fast: false
84+
# matrix:
85+
# kubernetes: [v1.27, testing]
86+
# steps:
87+
# - uses: actions/checkout@v3
88+
# - uses: actions/setup-go@v3
89+
# with: { go-version: 1.x }
90+
91+
# - name: Start k3s
92+
# uses: ./.github/actions/k3d
93+
# with:
94+
# k3s-channel: "${{ matrix.kubernetes }}"
95+
# prefetch-images: |
96+
# registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi8-4.30-16
97+
# registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.45-3
98+
# registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi8-1.19-3
99+
# registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:latest
100+
# registry.developers.crunchydata.com/crunchydata/crunchy-upgrade:latest
101+
# registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-14.8-3
102+
# registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-14.8-3.1-3
103+
# registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-15.3-3
104+
# registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-15.3-3.3-3
105+
# - run: go mod download
106+
# - name: Build executable
107+
# run: PGO_VERSION='${{ github.sha }}' make build-postgres-operator
108+
109+
# # Start a Docker container with the working directory mounted.
110+
# - name: Start PGO
111+
# run: |
112+
# kubectl apply --server-side -k ./config/namespace
113+
# kubectl apply --server-side -k ./config/dev
114+
# hack/create-kubeconfig.sh postgres-operator pgo
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-16' \
119+
# --env 'RELATED_IMAGE_PGBACKREST=registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.45-3' \
120+
# --env 'RELATED_IMAGE_PGBOUNCER=registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi8-1.19-3' \
121+
# --env 'RELATED_IMAGE_PGEXPORTER=registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:latest' \
122+
# --env 'RELATED_IMAGE_PGUPGRADE=registry.developers.crunchydata.com/crunchydata/crunchy-upgrade:latest' \
123+
# --env 'RELATED_IMAGE_POSTGRES_14=registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-14.8-3' \
124+
# --env 'RELATED_IMAGE_POSTGRES_14_GIS_3.1=registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-14.8-3.1-3' \
125+
# --env 'RELATED_IMAGE_POSTGRES_15=registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-15.3-3' \
126+
# --env 'RELATED_IMAGE_POSTGRES_15_GIS_3.3=registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-15.3-3.3-3' \
127+
# --env 'PGO_FEATURE_GATES=TablespaceVolumes=true' \
128+
# --name 'postgres-operator' ubuntu \
129+
# postgres-operator
130+
# - name: Install kuttl
131+
# run: |
132+
# curl -Lo /usr/local/bin/kubectl-kuttl https://github.com/kudobuilder/kuttl/releases/download/v0.13.0/kubectl-kuttl_0.13.0_linux_x86_64
133+
# chmod +x /usr/local/bin/kubectl-kuttl
134+
135+
# - run: make generate-kuttl
136+
# env:
137+
# KUTTL_PG_UPGRADE_FROM_VERSION: '14'
138+
# KUTTL_PG_UPGRADE_TO_VERSION: '15'
139+
# KUTTL_PG_VERSION: '14'
140+
# KUTTL_POSTGIS_VERSION: '3.1'
141+
# KUTTL_PSQL_IMAGE: 'registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-14.8-3'
142+
# - run: |
143+
# make check-kuttl && exit
144+
# failed=$?
145+
# echo '::group::PGO logs'; docker logs 'postgres-operator'; echo '::endgroup::'
146+
# exit $failed
147+
# env:
148+
# KUTTL_TEST: kubectl-kuttl test
149+
# - name: Stop PGO
150+
# run: docker stop 'postgres-operator' || true
151151

152152
# coverage-report:
153153
# if: ${{ success() || contains(needs.*.result, 'success') }}

0 commit comments

Comments
 (0)