-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: upgrade test environment to Postgres 14
* bump test environment image to Postgres 14 * simplify install of pglogical in the test image * lint README.md * format .github/workflows/workflow.yml * bump wntrblm/nox GitHub action to version 2025.02.09 * bump actions/upload-artifact v3 -> v4 to fix CI * v3 is "deprecated" and breaks when you try to run it
- Loading branch information
Showing
5 changed files
with
92 additions
and
98 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
name: build | ||
"on": | ||
"on": | ||
- push | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: wntrblm/nox@2023.04.22 | ||
- uses: wntrblm/nox@2025.02.09 | ||
- uses: Gr1N/setup-poetry@v8 | ||
- run: nox -s ci_lint | ||
unit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: wntrblm/nox@2023.04.22 | ||
- uses: wntrblm/nox@2025.02.09 | ||
- uses: Gr1N/setup-poetry@v8 | ||
- run: nox -s unit | ||
build: | ||
|
@@ -23,58 +23,58 @@ jobs: | |
- lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
- uses: Gr1N/setup-poetry@v8 | ||
- name: Make version unique for non-pypi builds | ||
if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | ||
run: poetry version $(poetry version -s).dev${{ github.run_id }} | ||
- name: Build the distribution | ||
run: poetry build | ||
- name: Store the distribution packages | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
- uses: actions/checkout@v4 | ||
- name: Set up python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- uses: Gr1N/setup-poetry@v8 | ||
- name: Make version unique for non-pypi builds | ||
if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | ||
run: poetry version $(poetry version -s).dev${{ github.run_id }} | ||
- name: Build the distribution | ||
run: poetry build | ||
- name: Store the distribution packages | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
|
||
publish-to-testpypi: | ||
name: Publish Python 🐍 distribution 📦 to TestPyPI | ||
needs: | ||
- build | ||
- build | ||
runs-on: ubuntu-latest | ||
|
||
environment: | ||
name: testpypi | ||
url: https://test.pypi.org/p/sqlalchemy-pglogical | ||
|
||
permissions: | ||
id-token: write # IMPORTANT: mandatory for trusted publishing | ||
id-token: write # IMPORTANT: mandatory for trusted publishing | ||
|
||
steps: | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Publish distribution 📦 to TestPyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Publish distribution 📦 to TestPyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
|
||
publish-to-pypi: | ||
name: Publish Python 🐍 distribution 📦 to PyPI | ||
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes | ||
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes | ||
needs: | ||
- build | ||
- build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/sqlalchemy_pglogical # Replace <package-name> with your PyPI project name | ||
url: https://pypi.org/p/sqlalchemy_pglogical # Replace <package-name> with your PyPI project name | ||
permissions: | ||
id-token: write # IMPORTANT: mandatory for trusted publishing | ||
id-token: write # IMPORTANT: mandatory for trusted publishing | ||
steps: | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v3 | ||
|
@@ -89,38 +89,38 @@ jobs: | |
Sign the Python 🐍 distribution 📦 with Sigstore | ||
and upload them to GitHub Release | ||
needs: | ||
- publish-to-pypi | ||
- publish-to-pypi | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write # IMPORTANT: mandatory for making GitHub Releases | ||
id-token: write # IMPORTANT: mandatory for sigstore | ||
contents: write # IMPORTANT: mandatory for making GitHub Releases | ||
id-token: write # IMPORTANT: mandatory for sigstore | ||
|
||
steps: | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Sign the dists with Sigstore | ||
uses: sigstore/[email protected] | ||
with: | ||
inputs: >- | ||
./dist/*.tar.gz | ||
./dist/*.whl | ||
- name: Create GitHub Release | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
run: >- | ||
gh release create | ||
'${{ github.ref_name }}' | ||
--notes-from-tag | ||
- name: Upload artifact signatures to GitHub Release | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
# Upload to GitHub Release using the `gh` CLI. | ||
# `dist/` contains the built packages, and the | ||
# sigstore-produced signatures and certificates. | ||
run: >- | ||
gh release upload | ||
'${{ github.ref_name }}' dist/** | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Sign the dists with Sigstore | ||
uses: sigstore/[email protected] | ||
with: | ||
inputs: >- | ||
./dist/*.tar.gz | ||
./dist/*.whl | ||
- name: Create GitHub Release | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
run: >- | ||
gh release create | ||
'${{ github.ref_name }}' | ||
--notes-from-tag | ||
- name: Upload artifact signatures to GitHub Release | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
# Upload to GitHub Release using the `gh` CLI. | ||
# `dist/` contains the built packages, and the | ||
# sigstore-produced signatures and certificates. | ||
run: >- | ||
gh release upload | ||
'${{ github.ref_name }}' dist/** |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,6 @@ | ||
# dockerfile for pglogical container for integration tests | ||
FROM postgres:13.10-bullseye | ||
FROM postgres:14-bullseye | ||
|
||
RUN apt update && apt install postgresql-14-pglogical | ||
|
||
# we have to do a source install because pglogical isn't published for arm64 | ||
RUN apt update && \ | ||
apt install -y curl make build-essential postgresql-server-dev-13 libkrb5-dev libxslt1-dev libselinux1-dev libpam0g-dev zlib1g-dev && \ | ||
curl -LO https://github.com/2ndQuadrant/pglogical/archive/refs/tags/REL2_4_2.tar.gz && \ | ||
tar xzf REL2_4_2.tar.gz && \ | ||
cd pglogical-REL2_4_2 && \ | ||
make clean && make install | ||
|
||
COPY postgresql.conf /etc/postgresql/postgresql.conf | ||
COPY postgresql.conf /etc/postgresql/postgresql.conf |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ version = "0.1.0" | |
description = "" | ||
authors = ["Ben Berry <[email protected]>"] | ||
readme = "README.md" | ||
packages = [{include = "sqlalchemy_pglogical"}] | ||
packages = [{ include = "sqlalchemy_pglogical" }] | ||
license = "MIT" | ||
|
||
homepage = "https://github.com/brandfolder/sqlalchemy-pglogical" | ||
|
@@ -17,7 +17,7 @@ classifiers = [ | |
"Development Status :: 4 - Beta", | ||
"Environment :: Console", | ||
"Intended Audience :: Developers", | ||
"Topic :: Database :: Front-Ends" | ||
"Topic :: Database :: Front-Ends", | ||
] | ||
[tool.poetry.urls] | ||
"Bug Tracker" = "https://github.com/brandfolder/sqlalchemy-pglogical/issues" | ||
|
@@ -45,4 +45,3 @@ build-backend = "poetry.core.masonry.api" | |
line-length = 88 | ||
target-version = ['py39'] | ||
include = '\.pyi?$' | ||
|