Skip to content

Trunk install test workflow #104

Trunk install test workflow

Trunk install test workflow #104

name: Trunk install test workflow
on:
workflow_dispatch:
schedule:
- cron: '0 12 * * *'
pull_request:
branches:
- main
paths:
- '.github/workflows/trunk-install-test.yml'
jobs:
test:
name: Run tests
runs-on:
- self-hosted
- dind
- large-8x8
container: quay.io/tembo/trunk-test:2678193
env:
PGHOST: "localhost"
PGPORT: "5432"
PGDATABASE: "postgres"
PGUSER: "postgres"
PGPASSWORD: "postgres"
POSTGRES_PASSWORD: "password"
steps:
- name: Install all extensions in registry
# Entrypoint is overwritten by GitHub Action. We need to execute it manually in order to start Postgres.
# More information here https://github.com/actions/runner/issues/1964
run: |
docker-entrypoint.sh postgres &
sleep 5
curl https://registry.pgtrunk.io/extensions/all | jq -r ".[] | .name" > /tmp/extensions.txt
trunk-install.sh | tee /tmp/output.txt
# grep -q ERROR /tmp/output.txt
# if [ $? -eq 1 ] ; then exit 1 ; else echo nope ; fi