Skip to content

Do not generate a new schema if already exists #237

Do not generate a new schema if already exists

Do not generate a new schema if already exists #237

Workflow file for this run

name: Build and run all tests
on:
push:
paths:
- '**'
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
CDWREGIONTEST_ACCESS_KEY_ID: ${{ secrets.cdwregiontest_access_key_id }}
CDWREGIONTEST_SECRET_ACCESS_KEY: ${{ secrets.cdwregiontest_secret_access_key }}
ORG: snowflake-labs
jobs:
build-image-almalinux:
runs-on:
labels:
ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
outputs:
tag: ${{ steps.build-and-push.outputs.tag }}
env:
BASE_IMAGE_NAME: almalinux
BASE_IMAGE_TAG: 9
FINAL_IMAGE_NAME: pg-lake-ci-pg-almalinux
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/actions/build-and-push-image
id: build-and-push
name: Build and push image
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
org_name: ${{ env.ORG }}
base_image_name: ${{ env.BASE_IMAGE_NAME }}
base_image_tag: ${{ env.BASE_IMAGE_TAG }}
final_image_name: ${{ env.FINAL_IMAGE_NAME }}
build-image-debian:
runs-on:
labels:
ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
outputs:
tag: ${{ steps.build-and-push.outputs.tag }}
env:
BASE_IMAGE_NAME: debian
BASE_IMAGE_TAG: bookworm-slim
FINAL_IMAGE_NAME: pg-lake-ci-pg-debian
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/actions/build-and-push-image
id: build-and-push
name: Build and push image
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
org_name: ${{ env.ORG }}
base_image_name: ${{ env.BASE_IMAGE_NAME }}
base_image_tag: ${{ env.BASE_IMAGE_TAG }}
final_image_name: ${{ env.FINAL_IMAGE_NAME }}
build-and-install-almalinux:
needs: build-image-almalinux
runs-on: ubuntu-latest
container:
image: ghcr.io/snowflake-labs/pg-lake-ci-pg-almalinux:${{ needs.build-image-almalinux.outputs.tag }}
options: --user 1001 --shm-size=128MB
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
strategy:
matrix:
pg_version: [16, 17, 18]
steps:
- uses: actions/checkout@v4
name: Check out repository code
- uses: ./.github/actions/build-and-install
name: Build and install
with:
container_os: 'almalinux'
pg_version: ${{ matrix.pg_version }}
build-and-install-debian:
needs: build-image-debian
runs-on: ubuntu-latest
container:
image: ghcr.io/snowflake-labs/pg-lake-ci-pg-debian:${{ needs.build-image-debian.outputs.tag }}
options: --user 1001 --shm-size=128MB
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
strategy:
matrix:
pg_version: [16, 17, 18]
steps:
- uses: actions/checkout@v4
name: Check out repository code
- uses: ./.github/actions/build-and-install
name: Build and install
with:
container_os: 'debian'
pg_version: ${{ matrix.pg_version }}
test-check:
needs: [build-image-almalinux, build-and-install-almalinux]
runs-on: ubuntu-latest
container:
image: ghcr.io/snowflake-labs/pg-lake-ci-pg-almalinux:${{ needs.build-image-almalinux.outputs.tag }}
options: --user 1001 --shm-size=128MB
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
strategy:
fail-fast: false
matrix:
pg_version: [17, 18]
test_make_target:
- 'check-duckdb_pglake'
- 'check-avro'
- 'check-pgduck_server'
- 'check-pg_lake_copy'
- 'check-pg_lake_iceberg'
- 'check-pg_lake_spatial'
- 'check-pg_lake'
- 'check-pg_lake_benchmark'
- 'check-pg_extension_base'
- 'check-pg_map'
steps:
- uses: actions/checkout@v4
name: Check out repository code
- uses: ./.github/actions/run-test
name: Run test
with:
container_os: 'almalinux'
pg_version: ${{ matrix.pg_version }}
test_make_target: ${{ matrix.test_make_target }}
# lake tables tests are slow, so we split them into 5 parallel jobs
test-check-pg-lake-table:
needs: [build-image-almalinux, build-and-install-almalinux]
runs-on: ubuntu-latest
container:
image: ghcr.io/snowflake-labs/pg-lake-ci-pg-almalinux:${{ needs.build-image-almalinux.outputs.tag }}
options: --user 1001 --shm-size=128MB
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
strategy:
fail-fast: false
matrix:
pg_version: [17, 18]
test_make_target:
- 'check-pg_lake_table'
# helps splitting tests into 5 parallel jobs
worker_id: [1, 2, 3, 4, 5]
steps:
- uses: actions/checkout@v4
name: Check out repository code
- uses: ./.github/actions/run-test
name: Run test
with:
container_os: 'almalinux'
pg_version: ${{ matrix.pg_version }}
test_make_target: ${{ matrix.test_make_target }}
worker_count: 5
worker_id: ${{ matrix.worker_id }}
test-installcheck:
needs: [build-image-debian, build-and-install-debian]
runs-on: ubuntu-latest
container:
image: ghcr.io/snowflake-labs/pg-lake-ci-pg-debian:${{ needs.build-image-debian.outputs.tag }}
options: --user 1001 --shm-size=128MB
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
strategy:
fail-fast: false
matrix:
pg_version: [16]
test_make_target:
- 'installcheck-pgduck_server'
- 'installcheck-pg_lake_copy'
- 'installcheck-pg_lake_iceberg'
- 'installcheck-pg_lake_spatial'
- 'installcheck-pg_lake'
- 'installcheck-pg_lake_benchmark'
- 'installcheck-pg_extension_base'
- 'installcheck-pg_map'
steps:
- uses: actions/checkout@v4
name: Check out repository code
- uses: ./.github/actions/run-test
name: Run test
with:
container_os: 'debian'
pg_version: ${{ matrix.pg_version }}
test_make_target: ${{ matrix.test_make_target }}
installcheck: 'true'
test-installcheck-postgres:
needs: [build-image-debian, build-and-install-debian]
runs-on: ubuntu-latest
container:
image: ghcr.io/snowflake-labs/pg-lake-ci-pg-debian:${{ needs.build-image-debian.outputs.tag }}
options: --user 1001 --shm-size=128MB
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
strategy:
fail-fast: false
matrix:
pg_version: [16, 17, 18]
test_make_target:
- 'installcheck-postgres'
- 'installcheck-postgres-with_extensions_created'
steps:
- uses: actions/checkout@v4
name: Check out repository code
- uses: ./.github/actions/run-test
name: Run test
with:
container_os: 'debian'
pg_version: ${{ matrix.pg_version }}
test_make_target: ${{ matrix.test_make_target }}
installcheck: 'true'
installcheck_postgres: 'true'
- name: Upload installcheck-postgres artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: installcheck-postgres-${{ matrix.pg_version }}-debian-logs
path: ${{ env.PG_REGRESS_DIR }}/regression.diffs
# lake tables tests are slow, so we split them into 5 parallel jobs
test-installcheck-pg-lake-table:
needs: [build-image-debian, build-and-install-debian]
runs-on: ubuntu-latest
container:
image: ghcr.io/snowflake-labs/pg-lake-ci-pg-debian:${{ needs.build-image-debian.outputs.tag }}
options: --user 1001 --shm-size=128MB
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
strategy:
fail-fast: false
matrix:
pg_version: [16]
test_make_target:
- 'installcheck-pg_lake_table'
# helps splitting tests into 5 parallel jobs
worker_id: [1, 2, 3, 4, 5]
steps:
- uses: actions/checkout@v4
name: Check out repository code
- uses: ./.github/actions/run-test
name: Run test
with:
container_os: 'debian'
pg_version: ${{ matrix.pg_version }}
test_make_target: ${{ matrix.test_make_target }}
installcheck: 'true'
worker_count: 5
worker_id: ${{ matrix.worker_id }}
test-isolation:
needs: [build-image-almalinux, build-and-install-almalinux]
runs-on: ubuntu-latest
container:
image: ghcr.io/snowflake-labs/pg-lake-ci-pg-almalinux:${{ needs.build-image-almalinux.outputs.tag }}
options: --user 1001 --shm-size=128MB
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
strategy:
fail-fast: false
matrix:
pg_version: [17, 18]
test_make_target:
- 'check-isolation_pg_lake_table'
steps:
- uses: actions/checkout@v4
name: Check out repository code
- uses: ./.github/actions/run-test
name: Run test
with:
container_os: 'almalinux'
pg_version: ${{ matrix.pg_version }}
test_make_target: ${{ matrix.test_make_target }}
isolation: 'true'
test-upgrade:
needs: [build-image-almalinux, build-and-install-almalinux]
runs-on: ubuntu-latest
container:
image: ghcr.io/snowflake-labs/pg-lake-ci-pg-almalinux:${{ needs.build-image-almalinux.outputs.tag }}
options: --user 1001 --shm-size=128MB
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
strategy:
fail-fast: false
matrix:
pg_version_pairs: ["16-17", "17-18", "16-18"]
test_make_target:
- 'check-pg_lake_table-upgrade'
steps:
- uses: actions/checkout@v4
name: Check out repository code
- name: Extract from and to pg versions
run: |
echo "from_pg_version=$(echo ${{ matrix.pg_version_pairs }} | cut -d '-' -f 1)" >> $GITHUB_ENV
echo "to_pg_version=$(echo ${{ matrix.pg_version_pairs }} | cut -d '-' -f 2)" >> $GITHUB_ENV
- uses: ./.github/actions/run-test
name: Run test
with:
container_os: 'almalinux'
test_make_target: ${{ matrix.test_make_target }}
pg_version: ${{ env.to_pg_version }}
from_pg_version: ${{ env.from_pg_version }}
upgrade: 'true'