Skip to content

Add a short git hash string into the file names of the packages. #15

Add a short git hash string into the file names of the packages.

Add a short git hash string into the file names of the packages. #15

Workflow file for this run

name: tests (tgmc)
on:
push:
branches:
- tgmc-master
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: pgml-extension
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Changed files in pgml-extension
id: pgml_extension_changed
run: |
echo "PGML_EXTENSION_CHANGED_FILES=$(git diff --name-only HEAD HEAD~1 . | wc -l)" >> $GITHUB_OUTPUT
- name: Install dependencies
if: steps.pgml_extension_changed.outputs.PGML_EXTENSION_CHANGED_FILES != '0'
run: |
sudo apt-get update && \
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC sudo apt-get install -y \
curl \
build-essential \
libopenblas-dev \
clang \
python3-dev \
libpython3-dev \
postgresql \
postgresql-server-dev-14 \
pkg-config \
python3-pip \
python3 \
lld
sudo pip3 install -r requirements.linux.txt
- name: Cache dependencies
uses: actions/cache@v3
if: steps.pgml_extension_changed.outputs.PGML_EXTENSION_CHANGED_FILES != '0'
with:
path: |
~/.cargo
pgml-extension/target
~/.pgrx
key: ${{ runner.os }}-rust-1.74-${{ hashFiles('pgml-extension/Cargo.lock') }}
- name: Submodules
if: steps.pgml_extension_changed.outputs.PGML_EXTENSION_CHANGED_FILES != '0'
run: |
git submodule update --init --recursive
- name: Run tests
if: steps.pgml_extension_changed.outputs.PGML_EXTENSION_CHANGED_FILES != '0'
run: |
curl https://sh.rustup.rs -sSf | sh -s -- -y
source ~/.cargo/env
cargo install cargo-pgrx --version "0.11.2" --locked
if [[ ! -d ~/.pgrx ]]; then
cargo pgrx init
fi
cargo pgrx test
# cargo pgrx start
# psql -p 28815 -h 127.0.0.1 -d pgml -P pager -f tests/test.sql
# cargo pgrx stop