-
Notifications
You must be signed in to change notification settings - Fork 883
93 lines (85 loc) · 2.85 KB
/
update-test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Test Update and Downgrade
"on":
push:
branches:
- main
- prerelease_test
pull_request:
jobs:
update_test:
name: Update test PG${{ matrix.pg }}
runs-on: 'ubuntu-latest'
strategy:
matrix:
pg: [14, 15, 16, 17]
fail-fast: false
env:
PG_VERSION: ${{ matrix.pg }}
POSTGRES_HOST_AUTH_METHOD: trust
steps:
- name: Checkout TimescaleDB
uses: actions/checkout@v4
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install gnupg systemd-coredump gdb postgresql-common libkrb5-dev
yes | sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
echo "deb https://packagecloud.io/timescale/timescaledb/ubuntu/ $(lsb_release -c -s) main" | sudo tee /etc/apt/sources.list.d/timescaledb.list
wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-${{ matrix.pg }} postgresql-server-dev-${{ matrix.pg }}
sudo apt-get install -y --no-install-recommends timescaledb-2-postgresql-${{ matrix.pg }}
git fetch --tags
- name: Update tests PG${{ matrix.pg }}
run: |
PATH="/usr/lib/postgresql/${{ matrix.pg }}/bin:$PATH"
./scripts/test_updates.sh
- name: Downgrade tests PG${{ matrix.pg }}
if: always()
run: |
PATH="/usr/lib/postgresql/${{ matrix.pg }}/bin:$PATH"
./scripts/test_downgrade.sh
- name: Update diff
if: failure()
run: |
find update_test -name "*.diff" | xargs -IFILE sh -c "echo '\nFILE\n';cat FILE"
- name: Check for coredumps
if: always()
id: collectlogs
run: |
# wait for in progress coredumps
sleep 10
if coredumpctl list; then
echo "coredumps=true" >>$GITHUB_OUTPUT
false
fi
- name: Stack trace
if: always() && steps.collectlogs.outputs.coredumps == 'true'
run: |
sudo coredumpctl gdb <<<"
set verbose on
set trace-commands on
show debug-file-directory
printf "'"'"query = '%s'\n\n"'"'", (char *) debug_query_string
frame function ExceptionalCondition
printf "'"'"condition = '%s'\n"'"'", (char *) conditionName
up 1
l
info args
info locals
bt full
" 2>&1 | tee stacktrace.log
./scripts/bundle_coredumps.sh
false
- name: Upload Coredumps
if: always() && steps.collectlogs.outputs.coredumps == 'true'
uses: actions/upload-artifact@v4
with:
name: Coredumps sqlsmith ${{ matrix.os }} PG${{ matrix.pg }}
path: coredumps
- name: Upload Artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: Update test PG${{ matrix.pg }}
path: update_test