Skip to content

Commit

Permalink
Add CI test and PGXN release workflows (#671)
Browse files Browse the repository at this point in the history
Also ignore bitcode and darwin dylib files, and make the PostgreSQL
version a valid SemVer in `META.json`.
  • Loading branch information
theory authored Sep 12, 2024
1 parent 164db2a commit 2b26e9e
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI
on:
push:
branches: ['*']
pull_request:
schedule:
- cron: '0 12 5 * *' # Monthly at noon on the fifth
jobs:
build:
strategy:
matrix:
pg: [17, 16, 15, 14]
name: 🐘 PostgreSQL ${{ matrix.pg }}
runs-on: ubuntu-latest
container: pgxn/pgxn-tools
steps:
- run: CREATE_OPTIONS="--pgoption max_locks_per_transaction=128" pg-start ${{ matrix.pg }} postgresql-${{ matrix.pg }}-pgtap
- uses: actions/checkout@v4
- run: make install
- run: psql -U postgres -c 'CREATE SCHEMA partman; CREATE EXTENSION pg_partman SCHEMA partman; CREATE EXTENSION pgtap'
- run: pg_prove --username postgres --ext .sql --comments --verbose --failures test
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Release
on:
push:
tags: [v*]
jobs:
release:
name: Release on PGXN
runs-on: ubuntu-latest
container: pgxn/pgxn-tools
env:
PGXN_USERNAME: ${{ secrets.PGXN_USERNAME }}
PGXN_PASSWORD: ${{ secrets.PGXN_PASSWORD }}
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Bundle the Release
id: bundle
run: pgxn-bundle
- name: Release on PGXN
run: pgxn-release
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ ignore/*
.deps/*
*.o
*.so
*.bc
*.dylib
sql/*.sql
test/not_working_yet/*
*.zip
2 changes: 1 addition & 1 deletion META.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"prereqs": {
"runtime": {
"requires": {
"PostgreSQL": "14.0"
"PostgreSQL": "14.0.0"
},
"recommends": {
"pg_jobmon": "1.4.1"
Expand Down

0 comments on commit 2b26e9e

Please sign in to comment.