diff --git a/.github/workflows/diagnostic.yaml b/.github/workflows/diagnostic.yaml new file mode 100644 index 0000000..00c40e4 --- /dev/null +++ b/.github/workflows/diagnostic.yaml @@ -0,0 +1,56 @@ +# Test diagnostic script from timescaledb-extras works +name: "Verify diagnostic script works" +"on": + schedule: + # run daily 0:00 on main branch + - cron: '0 0 * * *' + pull_request: + workflow_dispatch: +jobs: + diagnostic_test: + name: Test diagnostic script PG${{ matrix.pg }} + runs-on: ubuntu-latest + services: + ts: + image: timescale/timescaledb:latest-pg${{ matrix.pg }} + ports: + - 5432:5432 + env: + POSTGRES_HOST_AUTH_METHOD: trust + POSTGRESQL_PASSWORD: ci + + env: + PGHOST: localhost + PGUSER: postgres + PGPASSWORD: ci + + strategy: + fail-fast: false + matrix: + pg: [15,16,17,18] + + steps: + + - uses: actions/checkout@v4 + + - name: Wait for services to start + run: | + sleep 10 + pg_isready -t 30 + + - name: Prepare database + run: | + psql -v ON_ERROR_STOP=1 -c "$(cat <