-
-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (96 loc) · 3.24 KB
/
Copy pathschema-compat.yml
File metadata and controls
114 lines (96 loc) · 3.24 KB
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# workflows/schema-compat.yml
#
# Schema Compatibility Check
# Validates that the rails-paradedb API wrapper stays in sync with the
# ParadeDB SQL schema and that integration tests pass against the new version.
# Triggered automatically on each paradedb release (via repository_dispatch)
# or manually via workflow_dispatch.
name: Schema Compatibility Check
run-name: "Schema Compatibility Check — ParadeDB v${{ inputs.version || github.event.client_payload.version }}"
on:
repository_dispatch:
types: [paradedb-release]
workflow_dispatch:
inputs:
version:
description: "ParadeDB version to check against"
required: true
concurrency:
group: schema-compat-${{ github.head_ref || github.ref }}
cancel-in-progress: true
env:
PARADEDB_VERSION: ${{ inputs.version || github.event.client_payload.version }}
jobs:
schema-compat:
name: Check Schema Compatibility
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Set up uv
uses: astral-sh/setup-uv@v7
- name: Run Schema Compatibility Check
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: uv run --with json5 scripts/check_schema_compat.py ${{ env.PARADEDB_VERSION }}
integration-tests:
name: Integration Tests
runs-on: ubuntu-latest
services:
paradedb:
image: paradedb/paradedb:${{ inputs.version || github.event.client_payload.version }}-pg18
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres -d postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 12
env:
PARADEDB_TEST_DSN: postgresql://postgres:postgres@localhost:5432/postgres
PGPASSWORD: postgres
COVERAGE: "1"
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Run unit tests
env:
COVERAGE_COMMAND_NAME: unit
run: bundle exec rake test
- name: Run integration tests
env:
COVERAGE_COMMAND_NAME: integration
run: bundle exec rake test:integration
notify:
name: Notify on Failure
runs-on: ubuntu-latest
needs: [schema-compat, integration-tests]
if: failure()
steps:
- name: Create GitHub Issue
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh issue create \
--repo ${{ github.repository }} \
--title "Schema compat failure for ParadeDB v${{ env.PARADEDB_VERSION }}" \
--body "$(cat <<EOF
The schema compatibility check or integration tests failed against ParadeDB **v${{ env.PARADEDB_VERSION }}**.
**Workflow run:** ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
Please investigate and update rails-paradedb as needed.
EOF
)" \
--label bug