Upgrade pgrx to v0.12.6 #123
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: π§ͺ Lint and Test | |
on: | |
push: | |
branches-ignore: [wip/**] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
container: pgxn/pgxn-tools | |
strategy: | |
matrix: | |
pg: [12, 13, 14, 15, 16, 17] | |
name: π Postgres ${{ matrix.pg }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Start PostgreSQL ${{ matrix.pg }} | |
run: pg-start ${{ matrix.pg }} | |
- name: Setup Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Setup Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Test on PostgreSQL ${{ matrix.pg }} | |
run: pgrx-build-test | |
lint: | |
name: β Lint and Cover | |
runs-on: ubuntu-latest | |
container: pgxn/pgxn-tools | |
env: { PGVERSION: 16 } | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Start PostgreSQL ${{ env.PGVERSION }} | |
run: pg-start ${{ env.PGVERSION }} libxml2-utils | |
- name: Setup Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Setup Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install pgrx | |
run: make install-pgrx | |
- name: Initialize pgrx | |
run: make pgrx-init | |
- name: Format and Lint | |
run: make lint | |
- name: Generate Coverage | |
run: make cover RUST_BACKTRACE=1 PGUSER=postgres PGDATA=/var/lib/postgresql/pgrx | |
- name: Publish Coverage | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: tembo-io/pg-jsonschema-boon | |
files: target/cover/cobertura.xml | |
- name: Clear Badge Cache | |
uses: kevincobain2000/action-camo-purge@v1 | |
if: github.ref_name == 'main' |