Skip to content

Commit

Permalink
WIP: Update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ods committed Oct 26, 2024
1 parent 7133562 commit 24c8c61
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 55 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
73 changes: 38 additions & 35 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
name: Publish

on:
push:
branches: [ "update-actions" ]
release:
types: [created]
workflow_dispatch: {}
Expand All @@ -12,8 +14,8 @@ jobs:
package-source:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Prepare C files to include
Expand All @@ -25,9 +27,9 @@ jobs:
- name: Build source package
run: python -m build --sdist
- name: Upload source package
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: dist
name: dist-source
path: dist/

package-wheel:
Expand All @@ -49,17 +51,17 @@ jobs:
- os: windows-latest
arch: amd64
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Set up QEMU
if: ${{ matrix.arch == 'aarch64' }}
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: Build wheels
env:
CIBW_ARCHS_LINUX: ${{matrix.arch}}
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-* cp312-*
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-* cp313-*
CIBW_SKIP: '*-musllinux*'
CIBW_BEFORE_BUILD_LINUX: pip install -r requirements-cython.txt && yum install -y zlib-devel
# On windows and mac we should have z library preinstalled
Expand All @@ -71,9 +73,9 @@ jobs:
cibuildwheel --output-dir dist
shell: bash
- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: dist
name: dist-${{ matrix.os }}-${{ matrix.arch }}
path: dist/

test-wheels-windows:
Expand All @@ -96,14 +98,14 @@ jobs:
aiokafka_whl: dist/aiokafka-*-cp313-cp313-win_amd64.whl

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Download distributions
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: dist
name: dist-windows-latest-amd64
path: dist/
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

Expand Down Expand Up @@ -141,14 +143,14 @@ jobs:
aiokafka_whl: dist/aiokafka-*-cp313-cp313-macosx_*_x86_64.whl

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Download distributions
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: dist
name: dist-macos-13-x86_64
path: dist/
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

Expand Down Expand Up @@ -184,14 +186,14 @@ jobs:
aiokafka_whl: dist/aiokafka-*-cp313-cp313-macosx_*_arm64.whl

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Download distributions
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: dist
name: dist-macos-latest-arm64
path: dist/
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

Expand Down Expand Up @@ -227,14 +229,14 @@ jobs:
aiokafka_whl: dist/aiokafka-*-cp313-cp313-manylinux*_x86_64.whl

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Download distributions
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: dist
name: dist-ubuntu-latest-x86_64
path: dist/
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

Expand Down Expand Up @@ -276,14 +278,14 @@ jobs:
aiokafka_whl: dist/aiokafka-*-cp312-cp312-manylinux*_aarch64.whl

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: Download distributions
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: dist
name: dist-ubuntu-latest-aarch64
path: dist/
- name: Test Wheel
run: |
Expand Down Expand Up @@ -320,11 +322,12 @@ jobs:
https://pypi.org/project/aiokafka/${{ github.ref_name }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Download distributions
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
pattern: dist-*
merge-multiple: true
# - name: Publish to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
36 changes: 18 additions & 18 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.9

Expand All @@ -36,7 +36,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache packages
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-py-3.9-${{ hashFiles('requirements-ci.txt') }}-${{ hashFiles('setup.py') }}
Expand Down Expand Up @@ -76,11 +76,11 @@ jobs:
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

Expand All @@ -91,7 +91,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache packages
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-py-${{ matrix.python }}-${{ hashFiles('requirements-win-test.txt') }}-${{ hashFiles('setup.py') }}
Expand Down Expand Up @@ -120,15 +120,15 @@ jobs:
AIOKAFKA_NO_EXTENSIONS: "1"

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
file: ./coverage-ext.xml
flags: unit,cext
name: test-windows-${{ matrix.python }}-ext
if: ${{ always() }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
file: ./coverage-py.xml
flags: unit,purepy
Expand All @@ -144,11 +144,11 @@ jobs:
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

Expand All @@ -159,7 +159,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache packages
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-py-${{ matrix.python }}-${{ hashFiles('requirements-ci.txt') }}-${{ hashFiles('setup.py') }}
Expand Down Expand Up @@ -188,15 +188,15 @@ jobs:
AIOKAFKA_NO_EXTENSIONS: "1"

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
file: ./coverage-ext.xml
flags: unit,cext
name: test-mac-${{ matrix.python }}-ext
if: ${{ always() }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
file: ./coverage-py.xml
flags: unit,purepy
Expand Down Expand Up @@ -265,11 +265,11 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

Expand All @@ -285,7 +285,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache packages
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-py-${{ matrix.python }}-${{ hashFiles('requirements-ci.txt') }}-${{ hashFiles('setup.py') }}
Expand Down Expand Up @@ -317,15 +317,15 @@ jobs:
KAFKA_VERSION: ${{ matrix.kafka }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
file: ./coverage-ext.xml
flags: integration,cext
name: test-linux-${{ matrix.python }}-${{ matrix.kafka }}-${{ matrix.scala }}-ext
if: ${{ always() }}

- name: Upload coverage without cext to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
file: ./coverage-py.xml
flags: integration,purepy
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ cov cover coverage: lint

.PHONY: ci-test-unit
ci-test-unit:
pytest -s --log-format="%(asctime)s %(levelname)s %(message)s" --log-level DEBUG --cov aiokafka --cov-report xml --color=yes $(FLAGS) tests
pytest -s --log-format="%(asctime)s %(levelname)s %(message)s" --log-level DEBUG --cov aiokafka --cov-report xml --color=yes $(FLAGS) tests/test_helpers.py

.PHONY: ci-test-all
ci-test-all:
Expand Down

0 comments on commit 24c8c61

Please sign in to comment.