Skip to content

build: merge main into native-packages, bump actions/checkout to v7.0.1 #36

build: merge main into native-packages, bump actions/checkout to v7.0.1

build: merge main into native-packages, bump actions/checkout to v7.0.1 #36

Workflow file for this run

name: CI - Walkthrough
on:
push:
paths: ['examples/walkthrough/**', '.devcontainer/**', 'docs/walkthrough.md', '.github/workflows/ci-walkthrough.yml']
pull_request:
paths: ['examples/walkthrough/**', '.devcontainer/**', 'docs/walkthrough.md', '.github/workflows/ci-walkthrough.yml']
workflow_dispatch:
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
permissions:
contents: read
packages: read # pull the private coldfront-duckdb-base image the app builds FROM
jobs:
validate:
name: Validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Run ShellCheck
run: shellcheck -x --source-path=examples/walkthrough examples/walkthrough/*.sh
- name: Validate Docker Compose
run: |
docker compose -f examples/walkthrough/docker-compose.yml config --quiet
docker compose -f examples/walkthrough/docker-compose.mesh.yml config --quiet
smoke:
name: Smoke Test
needs: [validate]
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@v7
- name: Log in to GHCR
uses: docker/login-action@abd2ef45e78c5afb21d64d4ca52ee8550d9572c7 # v4.5.1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install prerequisites
run: sudo apt-get update -qq && sudo apt-get install -y -qq postgresql-client jq iproute2
- name: Run setup + Tiered demo non-interactively
working-directory: examples/walkthrough
env:
WALKTHROUGH_NONINTERACTIVE: "1"
WALKTHROUGH_DEMO: tiered
WALKTHROUGH_ROWS: "200000"
run: bash guide.sh
- name: Assert tiering proof
run: |
export PGPASSWORD=coldfront
relk=$(psql -h localhost -U coldfront -d coldfront -tAc "SELECT relkind FROM pg_class WHERE relname='events';")
wm=$(psql -h localhost -U coldfront -d coldfront -tAc "SELECT count(*) FROM coldfront.archive_watermark WHERE table_name='events';")
[ "$relk" = "v" ] || { echo "events not a view (relkind=$relk)"; exit 1; }
[ "$wm" = "1" ] || { echo "no watermark row"; exit 1; }
echo "Tiering proof OK"
- name: Check no services have exited
run: |
echo "=== Service Status ==="
docker compose -f examples/walkthrough/docker-compose.yml ps -a
# -a is required: plain `ps` hides stopped containers, so the grep could
# never match. lakekeeper-migrate is a one-shot that exits 0 by design;
# any OTHER exited container is a real crash.
if docker compose -f examples/walkthrough/docker-compose.yml ps -a \
| grep -iE 'exit' | grep -v lakekeeper-migrate; then
echo "ERROR: a service crashed"
docker compose -f examples/walkthrough/docker-compose.yml logs
exit 1
fi
echo "All services running (aside from the by-design migrate one-shot)"
- name: Dump logs on failure
if: failure()
working-directory: examples/walkthrough
run: docker compose logs
- name: Cleanup
if: always()
run: docker compose -f examples/walkthrough/docker-compose.yml down -v