]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
ci: updates action versions and add dependabot to check monthly for updates
authorTrenton Holmes <797416+stumpylog@users.noreply.github.com>
Sat, 18 May 2024 01:41:51 +0000 (18:41 -0700)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 15 Nov 2024 09:33:44 +0000 (10:33 +0100)
.github/dependabot.yml [new file with mode: 0644]
.github/workflows/3rd-party-tests.yml
.github/workflows/docs.yml
.github/workflows/packages-bin.yml
.github/workflows/packages-pool.yml
.github/workflows/packages-src.yml

diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644 (file)
index 0000000..8aa8288
--- /dev/null
@@ -0,0 +1,18 @@
+# https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#package-ecosystem
+
+version: 2
+updates:
+
+  # Enable updates for GitHub Actions
+  - package-ecosystem: "github-actions"
+    target-branch: "master"
+    directory: "/"
+    schedule:
+      # Check for updates to GitHub Actions every month
+      interval: "monthly"
+    groups:
+      actions:
+        update-types:
+          - "major"
+          - "minor"
+          - "patch"
index 26c9f270c6f08fd8468f12c3bfad7c538577499c..bb2ca6669eefa88488b2d34102fd7753a2a9b187 100644 (file)
@@ -225,7 +225,7 @@ jobs:
           USE_TZ = False
           HERE
 
-      - uses: actions/cache@v3
+      - uses: actions/cache@v4
         with:
           path: ~/.cache/pip
           key: ${{ matrix.python-version }}-pip-${{ hashFiles('django_home/django/tests/requirements/py3.txt', 'django_home/django/setup.cfg') }}
index 1dd1e94c9dc5e88794d57173a4b7ca437404f1d5..af58d44e9fe12c876a22a7c48d2aaea032c747eb 100644 (file)
@@ -15,7 +15,7 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - name: Trigger docs build
-        uses: peter-evans/repository-dispatch@v1
+        uses: peter-evans/repository-dispatch@v3
         with:
           repository: psycopg/psycopg-website
           event-type: psycopg3-commit
index ec5e1757a62160d733dae12364b948444b3fee92..46b6f88ee54f8c546d4fd41f15acfb5f97cd79b4 100644 (file)
@@ -27,14 +27,14 @@ jobs:
 
       - name: Set up QEMU for multi-arch build
         # Check https://github.com/docker/setup-qemu-action for newer versions.
-        uses: docker/setup-qemu-action@v2
+        uses: docker/setup-qemu-action@v3
         with:
           # Note: 6.2.0 is buggy: make sure to avoid it.
           # See https://github.com/pypa/cibuildwheel/issues/1250
           image: tonistiigi/binfmt:qemu-v7.0.0
 
       - name: Cache libpq build
-        uses: actions/cache@v3
+        uses: actions/cache@v4
         with:
           path: /tmp/libpq.build
           key: libpq-${{ matrix.platform }}-${{ matrix.arch }}-${{ env.LIBPQ_VERSION }}-${{ env.OPENSSL_VERSION }}
@@ -43,7 +43,7 @@ jobs:
         run: python3 ./tools/build/copy_to_binary.py
 
       - name: Build wheels
-        uses: pypa/cibuildwheel@v2.16.5
+        uses: pypa/cibuildwheel@v2.17.0
         with:
           package-dir: psycopg_binary
         env:
@@ -71,8 +71,9 @@ jobs:
             PSYCOPG_TEST_WANT_LIBPQ_BUILD=${{ env.LIBPQ_VERSION }}
             PSYCOPG_TEST_WANT_LIBPQ_IMPORT=${{ env.LIBPQ_VERSION }}
 
-      - uses: actions/upload-artifact@v3
+      - uses: actions/upload-artifact@v4
         with:
+          name: linux-${{matrix.pyver}}-${{matrix.platform}}_${{matrix.arch}}
           path: ./wheelhouse/*.whl
 
     services:
@@ -92,8 +93,58 @@ jobs:
 
   # }}}
 
-  macos:  # {{{
-    runs-on: macos-latest
+  macos-14:  # {{{
+    runs-on: macos-14
+    if: true
+
+    strategy:
+      fail-fast: false
+      matrix:
+        arch: [arm64]
+        pyver: [cp310, cp311, cp312]
+
+    env:
+      PG_VERSION: "16"
+
+    steps:
+      - uses: actions/checkout@v4
+
+      - name: Create the binary package source tree
+        run: python3 ./tools/build/copy_to_binary.py
+
+      - name: Install PostgreSQL on the runner
+        run: brew install gnu-sed postgresql@${PG_VERSION}
+
+      - name: Start PostgreSQL service
+        run: brew services start postgresql@${PG_VERSION}
+
+      - name: Build wheels
+        uses: pypa/cibuildwheel@v2.17.0
+        with:
+          package-dir: psycopg_binary
+        env:
+          CIBW_BUILD: ${{matrix.pyver}}-macosx_${{matrix.arch}}
+          CIBW_ARCHS_MACOS: ${{matrix.arch}}
+          CIBW_TEST_REQUIRES: ./psycopg[test] ./psycopg_pool
+          CIBW_TEST_COMMAND: >-
+            pytest {project}/tests -m 'not slow and not flakey' --color yes
+          CIBW_ENVIRONMENT: >-
+            PSYCOPG_IMPL=binary
+            PSYCOPG_TEST_DSN='dbname=postgres'
+            PATH="/opt/homebrew/opt/postgresql@${PG_VERSION}/bin:$PATH"
+            PSYCOPG_TEST_WANT_LIBPQ_BUILD=">= ${PG_VERSION}"
+            PSYCOPG_TEST_WANT_LIBPQ_IMPORT=">= ${PG_VERSION}"
+
+      - uses: actions/upload-artifact@v4
+        with:
+          name: macos-14-${{matrix.pyver}}-macosx_${{matrix.arch}}
+          path: ./wheelhouse/*.whl
+
+
+  # }}}
+
+  macos-12:  # {{{
+    runs-on: macos-12
     if: true
 
     strategy:
@@ -110,7 +161,7 @@ jobs:
         run: python3 ./tools/build/copy_to_binary.py
 
       - name: Build wheels
-        uses: pypa/cibuildwheel@v2.16.5
+        uses: pypa/cibuildwheel@v2.17.0
         with:
           package-dir: psycopg_binary
         env:
@@ -128,8 +179,9 @@ jobs:
             PSYCOPG_TEST_WANT_LIBPQ_BUILD=">= $PG_VERSION"
             PSYCOPG_TEST_WANT_LIBPQ_IMPORT=">= $PG_VERSION"
 
-      - uses: actions/upload-artifact@v3
+      - uses: actions/upload-artifact@v4
         with:
+          name: macos-12-${{matrix.pyver}}-macosx_${{matrix.arch}}
           path: ./wheelhouse/*.whl
 
 
@@ -159,7 +211,7 @@ jobs:
         run: python3 ./tools/build/copy_to_binary.py
 
       - name: Build wheels
-        uses: pypa/cibuildwheel@v2.16.5
+        uses: pypa/cibuildwheel@v2.17.0
         with:
           package-dir: psycopg_binary
         env:
@@ -179,8 +231,9 @@ jobs:
             PSYCOPG_TEST_WANT_LIBPQ_BUILD=">= 14"
             PSYCOPG_TEST_WANT_LIBPQ_IMPORT=">= 14"
 
-      - uses: actions/upload-artifact@v3
+      - uses: actions/upload-artifact@v4
         with:
+          name: windows-${{matrix.pyver}}-${{matrix.arch}}
           path: ./wheelhouse/*.whl
 
 
index db79ec13305b72832efae9d00d2c9af8719e6a32..7f41fb71abbe9ff41e6db4fc6d9d5b51d9036584 100644 (file)
@@ -39,8 +39,9 @@ jobs:
           PSYCOPG_TEST_DSN: "host=127.0.0.1 user=postgres"
           PGPASSWORD: password
 
-      - uses: actions/upload-artifact@v3
+      - uses: actions/upload-artifact@v4
         with:
+          name: ${{ matrix.package }}-${{ matrix.format }}
           path: ./dist/*
 
     services:
index 6b4f911dd234bbe3240f7daa931a833a8c5dbcbe..0e2bd7d823cc446e936b14502332cbccf41c5c67 100644 (file)
@@ -47,8 +47,9 @@ jobs:
           PSYCOPG_TEST_DSN: "host=127.0.0.1 user=postgres"
           PGPASSWORD: password
 
-      - uses: actions/upload-artifact@v3
+      - uses: actions/upload-artifact@v4
         with:
+          name: ${{ matrix.package }}-${{ matrix.format }}-${{ matrix.impl }}
           path: ./dist/*
 
     services: