Skip to content

Commit ae119fd

Browse files
committed
Add test workflow
1 parent 8ab1e0b commit ae119fd

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

.github/workflows/pgrx_test.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Run PGRX tests
2+
on: [push, pull_request, workflow_dispatch]
3+
permissions:
4+
contents: read
5+
6+
jobs:
7+
tester:
8+
runs-on: ${{ matrix.platform.runs_on }}
9+
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
pg:
14+
- major: 15
15+
minor: 7
16+
- major: 16
17+
minor: 3
18+
platform:
19+
- type: amd64
20+
runs_on: ubuntu-latest
21+
rustflags: '-C target-feature=+avx2,+fma'
22+
- type: arm64
23+
runs_on: cloud-image-runner-arm64
24+
rustflags: ''
25+
26+
env:
27+
PG_SRC_DIR: pgbuild
28+
PG_INSTALL_DIR: postgresql
29+
MAKE_JOBS: 6
30+
PG_CONFIG_PATH: postgresql/bin/pg_config
31+
TAG: ${{ github.event.inputs.tag }}
32+
TAG_DIR: pgvectorscale
33+
TAG_GIT_REF: ${{ github.event.inputs.TAG_GIT_REF == '' && github.event.inputs.tag || github.event.inputs.TAG_GIT_REF}}
34+
35+
steps:
36+
- name: Checkout pgvectorscale
37+
uses: actions/checkout@v4
38+
39+
- name: Install Linux Packages
40+
uses: ./.github/actions/install-packages
41+
42+
- name: Install Deb builder specific packages
43+
run: |
44+
sudo apt-get install dpkg-dev debhelper build-essential
45+
46+
- name: Install PostgreSQL ${{ matrix.pg.major }}
47+
uses: ./.github/actions/install-postgres
48+
with:
49+
pg-version: ${{ matrix.pg.major }}.${{ matrix.pg.minor }}
50+
pg-src-dir: ~/${{ env.PG_SRC_DIR }}
51+
pg-install-dir: ~/${{ env.PG_INSTALL_DIR }}
52+
53+
- name: Checkout ${{ env.TAG }}
54+
uses: actions/checkout@v4
55+
with:
56+
repository: timescale/pgvectorscale
57+
ref: '${{ env.TAG_GIT_REF }}'
58+
path: ${{ env.TAG_DIR }}
59+
60+
- name: Install pgrx
61+
uses: ./.github/actions/install-pgrx
62+
with:
63+
pg-install-dir: ~/${{ env.PG_INSTALL_DIR }}
64+
pgrx-version: 0.11.1
65+
66+
- name: Run tests
67+
id: runtests
68+
run: |
69+
cd pgvectorscale
70+
cargo pgrx test -- pg${{ matrix.pg.major }}

0 commit comments

Comments
 (0)