name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get install -y libclang-dev build-essential libreadline-dev zlib1g-dev flex bison libxml2-dev libxslt-dev libssl-dev libxml2-utils xsltproc ccache pkg-config
- name: Install PostgreSQL Client
run: sudo apt-get install -y postgresql-client
- name: Install pgrx
run: cargo install --locked cargo-pgrx
- name: Initialize pgrx
run: cargo pgrx init --pg16 download
- name: Build and test
env:
PGUSER: postgres
PGPASSWORD: password
PGHOST: localhost
PGPORT: 5432
run: cargo pgrx test pg16