-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (67 loc) · 2.41 KB
/
ci.yml
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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
continue-on-error: true
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-24.04, windows-latest, windows-2019, macos-latest, macos-13]
include:
- os: ubuntu-latest
postgres-version: '17'
- os: ubuntu-24.04
postgres-version: '17'
- os: windows-latest
postgres-version: '17'
- os: windows-2019
postgres-version: '17'
- os: macos-latest
postgres-version: '17'
- os: macos-13
postgres-version: '17'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup pgvector
uses: ./
with:
postgres-version: ${{ matrix.postgres-version }}
postgres-user: testuser
postgres-password: testpass
postgres-db: testdb
- name: Test Extension (Unix)
if: runner.os != 'Windows'
env:
PGPASSWORD: testpass
run: |
psql -h localhost -U testuser -d testdb -c 'CREATE EXTENSION IF NOT EXISTS vector;'
psql -h localhost -U testuser -d testdb -c 'CREATE TABLE IF NOT EXISTS items (id bigserial PRIMARY KEY, embedding vector(3));'
psql -h localhost -U testuser -d testdb -c "INSERT INTO items (embedding) VALUES ('[1,2,3]');"
psql -h localhost -U testuser -d testdb -c 'SELECT * FROM items;'
- name: Test Extension (Windows PowerShell)
if: runner.os == 'Windows'
shell: pwsh
env:
PGPASSWORD: testpass
run: |
psql -h localhost -U testuser -d testdb -c 'CREATE EXTENSION IF NOT EXISTS vector;'
psql -h localhost -U testuser -d testdb -c 'CREATE TABLE IF NOT EXISTS items (id bigserial PRIMARY KEY, embedding vector(3));'
psql -h localhost -U testuser -d testdb -c "INSERT INTO items (embedding) VALUES ('[1,2,3]');"
psql -h localhost -U testuser -d testdb -c 'SELECT * FROM items;'
- name: Test Extension (Windows CMD)
if: runner.os == 'Windows'
shell: cmd
env:
PGPASSWORD: testpass
run: psql -h localhost -U testuser -d testdb -c "SELECT * FROM items;"
- name: Test Extension (Windows MSYS2)
if: runner.os == 'Windows'
shell: msys2 {0}
env:
PGPASSWORD: testpass
run: psql -h localhost -U testuser -d testdb -c 'SELECT * FROM items;'