From ab9367c4d4636b0efb9d04089c0c156ab0aa580e Mon Sep 17 00:00:00 2001 From: "David E. Wheeler" Date: Fri, 2 Feb 2024 17:25:39 -0500 Subject: [PATCH 1/2] Add PGXN META.json and test and release workflows To make a release, put your PGXN username and password into the GitHub secrets `PGXN_USERNAME` and `PGXN_PASSWORD`, then tag with a semantic version, e.g., `git tag v0.0.1 -sm 'Tag v0.0.1'`. --- .gitattributes | 4 +++ .github/workflows/ci.yml | 19 +++++++++++++++ .github/workflows/release.yml | 20 +++++++++++++++ .gitignore | 1 + META.json | 46 +++++++++++++++++++++++++++++++++++ README.md | 4 +-- 6 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 .gitattributes create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml create mode 100644 META.json diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..792b631 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +.editorconfig export-ignore +.gitignore export-ignore +.gitattributes export-ignore +.github export-ignore diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..015c6c9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,19 @@ +name: ๐Ÿงช Continuous Integration +on: + push: + branches: ['*'] + pull_request: + schedule: + - cron: '0 12 5 * *' # Monthly at noon on the fifth +jobs: + build: + strategy: + matrix: + pg: [16, 15, 14, 13] + name: ๐Ÿ˜ PostgreSQL ${{ matrix.pg }} + runs-on: ubuntu-latest + container: pgxn/pgxn-tools + steps: + - run: pg-start ${{ matrix.pg }} + - uses: actions/checkout@v4 + - run: pg-build-test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7647f9c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,20 @@ +name: ๐Ÿš€ Release on PGXN +on: + push: + # Release on semantic version tag. + tags: ['v[0-9]+.[0-9]+.[0-9]+'] +jobs: + release: + name: Release on PGXN + runs-on: ubuntu-latest + container: pgxn/pgxn-tools + steps: + - name: Check out the repo + uses: actions/checkout@v4 + - name: Bundle the Release + run: pgxn-bundle + - name: Release on PGXN + env: + PGXN_USERNAME: ${{ secrets.PGXN_USERNAME }} + PGXN_PASSWORD: ${{ secrets.PGXN_PASSWORD }} + run: pgxn-release diff --git a/.gitignore b/.gitignore index 9d22eb4..ef72f58 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.o *.so +*.dylib diff --git a/META.json b/META.json new file mode 100644 index 0000000..714b354 --- /dev/null +++ b/META.json @@ -0,0 +1,46 @@ +{ + "name": "pg_kaboom", + "abstract": "Devious SQL-based SQL tools to crash your PostgreSQL server", + "description": "A Postgres data type for the Semantic Version format with support for btree and hash indexing.", + "version": "0.0.1", + "maintainer": [ + "David Christensen " + ], + "license": "apache_2_0", + "provides": { + "pg_kaboom": { + "abstract": "Blow things up in interesting and useful^W^W ways", + "file": "pg_kaboom.c", + "docfile": "README.md", + "version": "0.0.1" + } + }, + "prereqs": { + "runtime": { + "requires": { + "PostgreSQL": "13.0.0" + } + } + }, + "resources": { + "bugtracker": { + "web": "https://github.com/pgguru/pg_kaboom/issues/" + }, + "repository": { + "url": "git://github.com/pgguru/pg_kaboom.git", + "web": "https://github.com/pgguru/pg_kaboom/", + "type": "git" + } + }, + "generated_by": "David E. Wheeler", + "meta-spec": { + "version": "1.0.0", + "url": "https://pgxn.org/meta/spec.txt" + }, + "tags": [ + "kaboom", + "crash", + "testing", + "failover" + ] +} \ No newline at end of file diff --git a/README.md b/README.md index 63bfeaa..59d5655 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # pg_kaboom -[![pg_kaboom logo](https://github.com/CrunchyData/pg_kaboom/raw/main/static/pg_kaboom_logo.png)](https://github.com/CrunchyData/pg_kaboom/) - +[![pg_kaboom logo](https://github.com/pgguru/pg_kaboom/raw/main/static/pg_kaboom_logo.png)](https://github.com/pgguru/pg_kaboom/) +[![PGXN version](https://badge.fury.io/pg/pg_kaboom.svg)](https://badge.fury.io/pg/pg_kaboom) > Where's the kaboom?! There's supposed to be an Earth-shattering kaboom! From 5f053e06fa0a1340e14e2f4e463ba860943d091c Mon Sep 17 00:00:00 2001 From: David Christensen Date: Mon, 5 Feb 2024 14:30:31 -0600 Subject: [PATCH 2/2] fix: update metadata, workflows --- .github/workflows/ci.yml | 6 ++++-- META.json | 14 +++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 015c6c9..ec7a1d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,10 +9,12 @@ jobs: build: strategy: matrix: - pg: [16, 15, 14, 13] + pg: [16, 15, 14, 13, 12] name: ๐Ÿ˜ PostgreSQL ${{ matrix.pg }} runs-on: ubuntu-latest - container: pgxn/pgxn-tools + container: + image: pgxn/pgxn-tools + options: -e AS_USER=pgtest steps: - run: pg-start ${{ matrix.pg }} - uses: actions/checkout@v4 diff --git a/META.json b/META.json index 714b354..6377b69 100644 --- a/META.json +++ b/META.json @@ -1,7 +1,7 @@ { "name": "pg_kaboom", "abstract": "Devious SQL-based SQL tools to crash your PostgreSQL server", - "description": "A Postgres data type for the Semantic Version format with support for btree and hash indexing.", + "description": "Fault Injection Software to generate specific types of crashes in your Postgres server", "version": "0.0.1", "maintainer": [ "David Christensen " @@ -18,21 +18,21 @@ "prereqs": { "runtime": { "requires": { - "PostgreSQL": "13.0.0" + "PostgreSQL": ">= 12.0.0" } } }, "resources": { "bugtracker": { - "web": "https://github.com/pgguru/pg_kaboom/issues/" + "web": "https://github.com/CrunchyData/pg_kaboom/issues/" }, "repository": { - "url": "git://github.com/pgguru/pg_kaboom.git", - "web": "https://github.com/pgguru/pg_kaboom/", + "url": "git://github.com/CrunchyData/pg_kaboom.git", + "web": "https://github.com/CrunchyData/pg_kaboom/", "type": "git" } }, - "generated_by": "David E. Wheeler", + "generated_by": "David Christensen", "meta-spec": { "version": "1.0.0", "url": "https://pgxn.org/meta/spec.txt" @@ -43,4 +43,4 @@ "testing", "failover" ] -} \ No newline at end of file +}