diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..9141603 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,38 @@ +name: Build Package +on: + push: + branches: + - 'main' + pull_request: {} + +jobs: + build: + strategy: + matrix: + include: + - os: debian + dist: trixie + - os: debian + dist: bookworm + - os: ubuntu + dist: jammy + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + fetch-tags: true + + - name: Build package + uses: jtdor/build-deb-action@v1 + id: build + with: + before-build-hook: debchange --controlmaint --local="+ci${{ github.run_id }}~git$(git rev-parse --short HEAD)" "CI build" + docker-image: ${{ matrix.os }}:${{ matrix.dist }} + buildpackage-opts: '-uc -us -b' + + - name: Upload built packages + uses: actions/upload-artifact@v4 + with: + name: python-perfact-dbutils.${{ matrix.dist }} + path: ${{ steps.build.outputs.artifacts }} diff --git a/debian/control b/debian/control index fe4029b..c7b88b3 100644 --- a/debian/control +++ b/debian/control @@ -4,10 +4,17 @@ Priority: optional Maintainer: Viktor Dick Rules-Requires-Root: no Build-Depends: + devscripts, debhelper-compat (= 13), python3, - pybuild-plugin-pyproject, + python3-dev, + python3-setuptools, python3-setuptools-scm, + pybuild-plugin-pyproject, + git, + tox, + libpq-dev, + postgresql-18 | postgresql-17 | postgresql-16 | postgresql-15 | postgresql-14, Standards-Version: 4.6.2 Package: python3-perfact-dbutils diff --git a/debian/rules b/debian/rules index 1e139cf..0d0c708 100755 --- a/debian/rules +++ b/debian/rules @@ -5,7 +5,13 @@ #export DH_VERBOSE = 1 override_dh_auto_test: +ifeq ($(CI),true) + adduser --disabled-password --gecos "" ciuser + chown -R ciuser:ciuser $(CURDIR) + runuser -u ciuser -- tox +else tox +endif %: dh $@ --with python3 --buildsystem=pybuild