Skip to content

Add Python 3.12 support in CI (and remove 3.6/3.7/3.8) #125

Add Python 3.12 support in CI (and remove 3.6/3.7/3.8)

Add Python 3.12 support in CI (and remove 3.6/3.7/3.8) #125

Workflow file for this run

name: CI
on:
push:
pull_request:
env:
winfsp_version: "1.12.22339"
python_default_version: "3.12"
jobs:
Quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin v4.1.7
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # pin v5.1.1
with:
python-version: ${{ env.python_default_version }}
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # pin v3.0.1
Wheels:
name: Wheel for ${{ matrix.python_version }}-${{ matrix.architecture }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python_version: [cp39, cp310, cp311, cp312]
architecture: [win32, win_amd64]
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin v4.1.7
- name: Install winfsp
run: choco install winfsp -y --version=${{ env.winfsp_version }}
- name: Download winfsp-tests-x86
uses: engineerd/configurator@dc6b312d89ab097f73f3ebbf507a69dd7399c5d0 # pin v0.0.10
with:
name: winfsp-tests-x86.exe
url: https://github.com/winfsp/winfsp/releases/download/v${{ env.winfsp_version }}/winfsp-tests-${{ env.winfsp_version }}.zip
pathInArchive: winfsp-tests-x86.exe
- name: Run cibuildwheel for ${{ matrix.python_version }}-${{ matrix.architecture }}
uses: pypa/cibuildwheel@bd033a44476646b606efccdd5eed92d5ea1d77ad # pin v2.20.0
env:
CIBW_BUILD: ${{ matrix.python_version }}-${{ matrix.architecture }}
CIBW_TEST_COMMAND: pytest --pyargs winfspy --doctest-modules --cov=winfspy --cov-report=xml:{project}/coverage.xml --cov-report=term -vvv --log-level INFO
CIBW_BEFORE_TEST: pip install -r requirements-test.txt
- name: Upload coverage report on codecov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # pin v4.5.0
env:
PYTHON_VERSION: ${{ matrix.architecture }}
ARCHITECTURE: ${{ matrix.python_version }}
with:
env_vars: PYTHON_VERSION, ARCHITECTURE
- name: Upload wheel as an artifact
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # pin v4.3.6
with:
name: wheel-${{ matrix.runs-on }}-${{ matrix.python_version }}-${{ matrix.architecture }}
path: ./wheelhouse/*.whl
Source:
name: Source distribution
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin v4.1.7
- name: Install winfsp
run: choco install winfsp -y --version=${{ env.winfsp_version }}
- name: Set up Python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # pin v5.1.1
with:
python-version: ${{ env.python_default_version }}
- name: Build source distribution
run: |
pip install .
python setup.py sdist
- name: Upload wheel as an artifact
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # pin v4.3.6
with:
name: wheel-source
path: ./dist/*.tar.gz
Release:
runs-on: ubuntu-latest
needs: [Quality, Wheels, Source]
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
steps:
- name: Download wheels and source distribution
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # pin v4.1.8
with:
pattern: wheel-*
path: dist
merge-multiple: true
- name: SHOW ME WHAT YOU GOT
run: |
ls -lh
ls -lh dist
# - name: Publish on PyPI
# uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # pin v1.9.0
# with:
# user: __token__
# password: ${{ secrets.pypi_password }}