-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (48 loc) · 2.07 KB
/
Copy pathpytest.yml
File metadata and controls
56 lines (48 loc) · 2.07 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
name: tests
# Dogfoods the reusable provision-meos composite action, the single step every
# binding uses to obtain the MEOS artifacts from one pinned MobilityDB commit.
# The action builds and installs all-families libmeos (incl. pgPointCloud via
# PGDG PG17) and derives output/meos-idl.json from the installed, self-contained
# headers, then the pytest suite (type recovery + struct layout + portable
# alias parity) runs against that catalog — the same catalog correctness signal
# master had before, now produced by the shared action and FFI-accurate.
on:
pull_request:
push:
branches: [master]
workflow_dispatch:
jobs:
tests:
name: Build libmeos + regenerate catalog + pytest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Build + install all-families libmeos and derive the catalog from the
# installed headers — the exact step a native/FFI binding runs.
- name: Provision the MEOS catalog and libmeos
id: provision
uses: ./.github/actions/provision-meos
with:
mobilitydb-ref: master
build-libmeos: "true"
- name: Assert libmeos.so is installed and print the family summary
run: |
test -f "${{ steps.provision.outputs.libmeos-prefix }}/lib/libmeos.so"
echo "libmeos installed at ${{ steps.provision.outputs.libmeos-prefix }}/lib/libmeos.so"
echo "----- cmake family summary -----"
grep -E 'Including|Excluding' "$RUNNER_TEMP/cmake-configure.log" || true
- name: Install pytest
run: pip install pytest
# The action wrote output/meos-idl.json at the repo root, exactly where
# the suite loads it from; assert the advertised path and run the tests.
- name: Run the test suite
run: |
test -s "${{ steps.provision.outputs.catalog-path }}"
python3 -m pytest tests/ -v
- name: Upload meos-idl.json as artefact
if: always()
uses: actions/upload-artifact@v4
with:
name: meos-idl
path: output/meos-idl.json
if-no-files-found: error