File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ # Test diagnostic script from timescaledb-extras works
2+ name : " Verify diagnostic script works"
3+ " on " :
4+ schedule :
5+ # run daily 0:00 on main branch
6+ - cron : ' 0 0 * * *'
7+ pull_request :
8+ workflow_dispatch :
9+ jobs :
10+ diagnostic_test :
11+ name : Test diagnostic script PG${{ matrix.pg }}
12+ runs-on : ubuntu-latest
13+ services :
14+ ts :
15+ image : timescale/timescaledb:latest-pg${{ matrix.pg }}
16+ ports :
17+ - 5432:5432
18+ env :
19+ POSTGRES_HOST_AUTH_METHOD : trust
20+ POSTGRESQL_PASSWORD : ci
21+
22+ env :
23+ PGHOST : localhost
24+ PGUSER : postgres
25+ PGPASSWORD : ci
26+
27+ strategy :
28+ fail-fast : false
29+ matrix :
30+ pg : [15,16,17,18]
31+
32+ steps :
33+
34+ - uses : actions/checkout@v4
35+
36+ - name : Wait for services to start
37+ run : |
38+ sleep 10
39+ pg_isready -t 30
40+
41+ - name : Prepare database
42+ run : |
43+ psql -v ON_ERROR_STOP=1 -c "$(cat <<SQL
44+ SELECT version();
45+ SELECT extname, extversion from pg_extension;
46+ CREATE TABLE t(time timestamptz) WITH (tsdb.hypertable);
47+ INSERT INTO t SELECT '2025-01-01';
48+ INSERT INTO t SELECT '2025-02-01';
49+ SELECT compress_chunk(show_chunks('t'));
50+ SQL
51+ )"
52+
53+ - name : Run diagnostic script
54+ run : |
55+ psql -v ON_ERROR_STOP=1 < diagnostic.sql
56+
You can’t perform that action at this time.
0 commit comments