Remove extraneous parenthesis found by Ruff/pyupgrade (#2110) #886
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: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Build and test | |
runs-on: windows-2019 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12-dev'] | |
architecture: ['x64', 'x86'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: ${{ matrix.architecture }} | |
- name: Setup environment | |
run: | | |
python --version | |
pip --version | |
pip install --upgrade setuptools wheel | |
- name: Build and install | |
run: | | |
python setup.py --skip-verstamp install --user | |
- name: Run tests | |
# Run the tests directly from the source dir so support files (eg, .wav files etc) | |
# can be found - they aren't installed into the Python tree. | |
run: python pywin32_testall.py -v -skip-adodbapi | |
- name: Build wheels | |
run: | | |
python setup.py bdist_wheel --skip-build | |
- uses: actions/upload-artifact@v3 | |
if: ${{ always() }} | |
with: | |
name: artifacts | |
path: | | |
dist/*.whl | |
dist/*.exe | |
# We cannot build and test on ARM64, so we cross-compile. | |
# Later, when available, we can add tests using this wheel on ARM64 VMs | |
build_arm64: | |
name: Cross-compile ARM | |
runs-on: windows-2019 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.10', '3.11', '3.12-dev'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: 'x64' | |
- name: Setup Environment | |
run: | | |
python --version | |
pip --version | |
pip install --upgrade setuptools wheel | |
- name: Obtain ARM64 library files | |
run: | | |
python .github\workflows\download-arm64-libs.py .\arm64libs | |
- name: Build wheels | |
run: python setup.py --skip-verstamp build_ext -L .\arm64libs --plat-name win-arm64 build --plat-name win-arm64 bdist_wheel --plat-name win-arm64 | |
- uses: actions/upload-artifact@v3 | |
if: ${{ always() }} | |
with: | |
name: artifacts | |
path: | | |
dist/*.whl | |
checkers: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: pip install isort pycln | |
- run: pycln . --config=pycln.toml --check | |
- run: isort . --diff --check-only | |
- uses: psf/black@stable | |
with: | |
options: "--fast --check --diff --verbose" |