Update Readme and Contributing.md #383
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Extension Upgrade | |
defaults: | |
run: | |
shell: bash | |
working-directory: ./extension | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- ".github/workflows/extension_upgrade.yml" | |
- "extension/**" | |
jobs: | |
test: | |
name: Upgrade Test | |
runs-on: ubuntu-24.04 | |
services: | |
vector-serve: | |
image: quay.io/tembo/vector-serve:latest | |
ports: | |
- 3000:3000 | |
steps: | |
- name: Checkout repository content | |
uses: actions/checkout@v2 | |
- name: Install Rust stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
prefix-key: "extension-upgrade-test" | |
workspaces: | | |
vectorize | |
# Additional directories to cache | |
cache-directories: | | |
/home/runner/.pgrx | |
- name: Get current version | |
id: current-version | |
run: echo "CI_BRANCH=$(git name-rev --name-only HEAD)" >> $GITHUB_OUTPUT | |
- name: Install sys dependencies | |
run: | | |
sudo apt-get update && sudo apt-get install -y postgresql-server-dev-16 libopenblas-dev libreadline-dev | |
- uses: ./.github/actions/pgx-init | |
with: | |
working-directory: ./extension | |
- name: Install project dependencies | |
run: | | |
make setup | |
- name: Test previous version (main)) | |
env: | |
HF_API_KEY: ${{ secrets.HF_API_KEY }} | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
CO_API_KEY: ${{ secrets.CO_API_KEY }} | |
run: | | |
git fetch --tags | |
git checkout main | |
echo "\q" | make run | |
cargo test -- --ignored --test-threads=1 | |
- name: Test branch's version | |
env: | |
CI_BRANCH: ${{ steps.current-version.outputs.CI_BRANCH }} | |
HF_API_KEY: ${{ secrets.HF_API_KEY }} | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
CO_API_KEY: ${{ secrets.CO_API_KEY }} | |
run: | | |
git checkout $CI_BRANCH | |
make test-update | |
- name: Debugging information | |
if: always() | |
env: | |
CI_BRANCH: ${{ steps.current-version.outputs.CI_BRANCH }} | |
run: | | |
git checkout $CI_BRANCH | |
make cat-logs |