forked from timescale/timescaledb
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (31 loc) · 1.14 KB
/
catalog-updates-check.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
name: Check for unsafe catalog updates
"on":
pull_request:
jobs:
check_catalog_correctly_updated:
name: Check updates to latest-dev and reverse-dev are properly handled by PR
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pglast
run: |
python -m pip install pglast
- name: Check sql file contents
run: |
find sql -name '*.sql' -not -path 'sql/updates/*' -not -path 'sql/compat.sql' | xargs -IFILE python scripts/check_updates_ast.py FILE
- name: Check latest-dev contents
run: |
python scripts/check_updates_ast.py --latest "sql/updates/latest-dev.sql"
- name: Check for idempotency in SQL scripts
if: always()
run: |
python scripts/check_sql_script.py sql/*.sql
# To allow fixing previous mistakes we run the check against reverse-dev but don't
# fail it on errors.
- name: Check reverse-dev contents
if: always()
run: |
python scripts/check_updates_ast.py "sql/updates/reverse-dev.sql" || true