Fix style according to ruff #108
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
pull_request: | |
env: | |
winfsp_version: "1.12.22339" | |
jobs: | |
Quality: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
- uses: pre-commit/[email protected] | |
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@v2 | |
- name: Install winfsp | |
run: choco install winfsp -y --version=${{ env.winfsp_version }} | |
- name: Download winfsp-tests-x86 | |
uses: engineerd/[email protected] | |
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/[email protected] | |
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@v1 | |
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@v2 | |
with: | |
path: ./wheelhouse/*.whl | |
Source: | |
name: Source distribution | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install winfsp | |
run: choco install winfsp -y --version=${{ env.winfsp_version }} | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.12 | |
- name: Build source distribution | |
run: python setup.py sdist | |
- name: Upload wheel as an artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
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@v2 | |
with: | |
name: artifact | |
path: dist | |
- name: Publish on PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_password }} |