diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 5c4d7c65..b1ca708a 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,13 +1,13 @@ name: "CodeQL" -on: - push: - branches: [ 'master' ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ 'master' ] - schedule: - - cron: '36 22 * * 0' +on: [] + # push: + # branches: [ 'master' ] + # pull_request: + # # The branches below must be a subset of the branches above + # branches: [ 'master' ] + # schedule: + # - cron: '36 22 * * 0' jobs: analyze: @@ -37,11 +37,11 @@ jobs: # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. - + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs queries: +security-and-quality - + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild @@ -50,7 +50,7 @@ jobs: # ℹī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - # If the Autobuild fails above, remove it and uncomment the following three lines. + # If the Autobuild fails above, remove it and uncomment the following three lines. # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. # - run: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 880a34d2..233cd0d5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,10 +3,10 @@ name: Publish -on: - release: - types: [created] - workflow_dispatch: {} +on: push + # release: + # types: [created] + # workflow_dispatch: {} jobs: package-source: @@ -35,11 +35,19 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - arch: [auto] include: + # Available images: + # https://github.com/actions/runner-images?tab=readme-ov-file#available-images + - os: ubuntu-latest + arch: x86_64 - os: ubuntu-latest arch: aarch64 + - os: macos-latest-large + arch: x86_64 + - os: macos-latest + arch: arm64 + - os: windows-latest + arch: amd64 steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 @@ -115,7 +123,7 @@ jobs: test-wheels-mac: needs: [package-source, package-wheel] - runs-on: macos-latest + runs-on: macos-latest-large strategy: matrix: @@ -132,6 +140,49 @@ jobs: - python: "3.12" aiokafka_whl: dist/aiokafka-*-cp312-cp312-macosx_*_x86_64.whl + steps: + - uses: actions/checkout@v2 + - name: Download distributions + uses: actions/download-artifact@v2 + with: + name: dist + path: dist/ + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + + - name: Install python dependencies + run: | + pip install --upgrade pip setuptools wheel + pip install -r requirements-ci.txt + pip install ${{ matrix.aiokafka_whl }} + + - name: Run Unit Tests + run: | + # Remove source code to be sure we use wheel code + rm -rf aiokafka + make ci-test-unit + + test-wheels-mac-arm64: + needs: [package-source, package-wheel] + runs-on: macos-latest + + strategy: + matrix: + python: ["3.8", "3.9", "3.10", "3.11", "3.12"] + include: + - python: "3.8" + aiokafka_whl: dist/aiokafka-*-cp38-cp38-macosx_*_arm64.whl + - python: "3.9" + aiokafka_whl: dist/aiokafka-*-cp39-cp39-macosx_*_arm64.whl + - python: "3.10" + aiokafka_whl: dist/aiokafka-*-cp310-cp310-macosx_*_arm64.whl + - python: "3.11" + aiokafka_whl: dist/aiokafka-*-cp311-cp311-macosx_*_arm64.whl + - python: "3.12" + aiokafka_whl: dist/aiokafka-*-cp312-cp312-macosx_*_arm64.whl + steps: - uses: actions/checkout@v2 - name: Download distributions @@ -250,20 +301,20 @@ jobs: make ci-test-unit && \ deactivate' - deploy: + # deploy: - runs-on: ubuntu-latest - needs: [test-wheels-linux, test-wheels-aarch64-linux, test-wheels-mac, test-wheels-windows] + # runs-on: ubuntu-latest + # needs: [test-wheels-linux, test-wheels-aarch64-linux, test-wheels-mac, test-wheels-mac-arm64, test-wheels-windows] - steps: - - uses: actions/checkout@v2 - - name: Download distributions - uses: actions/download-artifact@v2 - with: - name: dist - path: dist/ - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@master - with: - user: ${{ secrets.PYPI_USERNAME }} - password: ${{ secrets.PYPI_PASSWORD }} + # steps: + # - uses: actions/checkout@v2 + # - name: Download distributions + # uses: actions/download-artifact@v2 + # with: + # name: dist + # path: dist/ + # - name: Publish to PyPI + # uses: pypa/gh-action-pypi-publish@master + # with: + # user: ${{ secrets.PYPI_USERNAME }} + # password: ${{ secrets.PYPI_PASSWORD }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ed36a018..00f2d02a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,14 +3,14 @@ name: Tests -on: - push: - branches: [ master, '**' ] - tags: - - "v0.[0-9]+.[0-9]+" - - "v0.[0-9]+.[0-9]+.dev*" - pull_request: - branches: [ master ] +on: [] + # push: + # branches: [ master, '**' ] + # tags: + # - "v0.[0-9]+.[0-9]+" + # - "v0.[0-9]+.[0-9]+.dev*" + # pull_request: + # branches: [ master ] jobs: test-sanity: