From 8f7206dc963ac4619f01facdd555fb0d386bfb96 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 5 Feb 2025 14:55:10 -0600 Subject: [PATCH 1/6] Add dependabot config --- .github/dependabot.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..13a3142 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,20 @@ +version: 2 +updates: + # GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + groups: + actions: + patterns: + - "*" + assignees: + - "@mongodb/dbx-python" + # Python + - package-ecosystem: "pip" + directory: "/bindings/python" + schedule: + interval: "weekly" + assignees: + - "@mongodb/dbx-python" \ No newline at end of file From f7e80b060b3c7600691a84c3ad413454b46dd03a Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 5 Feb 2025 14:59:01 -0600 Subject: [PATCH 2/6] update workflow --- .github/workflows/release-python.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index e6a61ab..f4601e2 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -106,9 +106,9 @@ jobs: run: | find . -mindepth 2 -type f -exec mv {} . \; find . -type d -empty -delete - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: - name: all-dist-${{ github.head_ref || github.ref_name }} + name: all-dist-${{ github.run_id }} path: "./*" publish: # https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#publishing-the-distribution-to-pypi @@ -120,9 +120,9 @@ jobs: id-token: write steps: - name: Download all the dists - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: all-dist-${{ github.head_ref || github.ref_name }} + name: all-dist--${{ github.run_id }} path: dist/ - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file From 1659c2b3b3fbb7de4906a9be272a051b4ccea23f Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 5 Feb 2025 15:01:32 -0600 Subject: [PATCH 3/6] update test matrix --- .github/workflows/release-python.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index f4601e2..ec0104c 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -28,9 +28,9 @@ jobs: CIBW_ARCHS_MACOS: x86_64 universal2 CIBW_TEST_SKIP: '*universal2:arm64' CIBW_BUILD: "cp38-macosx_universal2 cp38-win* cp38-manylinux_{x86_64,i686}" - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: - name: python_bsonjs-3.8-${{ matrix.os }}-wheel + name: wheel-${{ github.run_id }} path: ./wheelhouse/*.whl if-no-files-found: error test_non_linux_wheels: @@ -48,9 +48,9 @@ jobs: python-version: ${{ matrix.python-version }} allow-prereleases: true - name: Download a previously created wheel - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: - name: python_bsonjs-3.8-${{ matrix.os }}-wheel + name: wheel-${{ github.run_id }} - name: Test wheel shell: bash run: | From 379e501b6a72f788e25d3b94e98790fc2645a1e7 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 5 Feb 2025 15:03:39 -0600 Subject: [PATCH 4/6] clean up dist handling --- .github/workflows/release-python.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index ec0104c..f25f117 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -71,9 +71,9 @@ jobs: name: Test CPython ${{ matrix.python-version }}-${{ matrix.container }} steps: - name: Download a previously created wheel - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: - name: python_bsonjs-3.8-${{ matrix.os }}-wheel + name: wheel-${{ github.run_id }} - name: Test wheel run: | docker run --rm --volume `pwd`:/python quay.io/pypa/${{ matrix.container }} /bin/bash -c "/opt/python/${{ matrix.python-version }}/bin/python -m pip install -U pip && /opt/python/${{ matrix.python-version }}/bin/python -m pip install --find-links=/python/ --no-index python_bsonjs && /opt/python/${{ matrix.python-version }}/bin/python -m pip list | grep python-bsonjs && /opt/python/${{ matrix.python-version }}/bin/python -c 'from bsonjs import dumps'" @@ -100,7 +100,7 @@ jobs: name: Download Wheels steps: - name: Download all workflow run artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 - name: Flatten directory working-directory: . run: | From 2c1a56857d9b4a3b998df62cdc2ad1f8865fdca0 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 5 Feb 2025 15:05:50 -0600 Subject: [PATCH 5/6] clean up dist handling --- .github/workflows/release-python.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index f25f117..fbe4e2d 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -30,7 +30,7 @@ jobs: CIBW_BUILD: "cp38-macosx_universal2 cp38-win* cp38-manylinux_{x86_64,i686}" - uses: actions/upload-artifact@v4 with: - name: wheel-${{ github.run_id }} + name: ${{ matrix.os }}-wheel path: ./wheelhouse/*.whl if-no-files-found: error test_non_linux_wheels: @@ -90,7 +90,7 @@ jobs: run: | python -m pip install build python -m build --sdist - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: "sdist" path: dist/*.tar.gz From fca7fde4857868c56660d6d6fb77320ac4141ce9 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 5 Feb 2025 16:37:54 -0600 Subject: [PATCH 6/6] make names consistent --- .github/workflows/release-python.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index fbe4e2d..69e1957 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -19,7 +19,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-12, windows-2019, ubuntu-latest] + os: [macos-14, windows-2019, ubuntu-latest] name: Build CPython ${{ matrix.python-version }}-${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -50,7 +50,7 @@ jobs: - name: Download a previously created wheel uses: actions/download-artifact@v4 with: - name: wheel-${{ github.run_id }} + name: ${{ matrix.os }}-wheel - name: Test wheel shell: bash run: | @@ -73,7 +73,7 @@ jobs: - name: Download a previously created wheel uses: actions/download-artifact@v4 with: - name: wheel-${{ github.run_id }} + name: ${{ matrix.os }}-wheel - name: Test wheel run: | docker run --rm --volume `pwd`:/python quay.io/pypa/${{ matrix.container }} /bin/bash -c "/opt/python/${{ matrix.python-version }}/bin/python -m pip install -U pip && /opt/python/${{ matrix.python-version }}/bin/python -m pip install --find-links=/python/ --no-index python_bsonjs && /opt/python/${{ matrix.python-version }}/bin/python -m pip list | grep python-bsonjs && /opt/python/${{ matrix.python-version }}/bin/python -c 'from bsonjs import dumps'"