Skip to content

Commit

Permalink
Fix 'Github Actions' configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
lycantropos committed Apr 2, 2023
1 parent 1c5f4aa commit 58d18db
Showing 1 changed file with 20 additions and 22 deletions.
42 changes: 20 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ${{ matrix.platform.os }}
strategy:
matrix:
python_version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python_version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
platform: [
{
os: 'macos-latest',
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
with:
submodules: true
- name: 'Setup Python'
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
architecture: ${{ matrix.platform.python_architecture }}
Expand All @@ -71,17 +71,15 @@ jobs:
run: python -m pip install -U gcovr
if: ${{ !startsWith(matrix.python_version, 'pypy') }}
- name: 'Install in editable mode'
run: python -m pip -v install -e .
run: python -m pip -v install -e .[tests]
env:
CPPFLAGS: --coverage -O0
- name: 'Install Mypy'
run: python -m pip install -U mypy
if: ${{ !startsWith(matrix.python_version, 'pypy') }}
if: ${{ matrix.python_version != 'pypy-3.7' }}
- name: 'Run Mypy'
run: python -m mypy --strict ${{ github.event.repository.name }}
if: ${{ !startsWith(matrix.python_version, 'pypy') }}
- name: 'Install tests dependencies'
run: python -m pip install -r requirements-tests.txt
run: python -m mypy ${{ github.event.repository.name }}
if: ${{ matrix.python_version != 'pypy-3.7' }}
- name: 'Run doctests'
run: >
coverage run -m doctest README.md
Expand All @@ -94,14 +92,14 @@ jobs:
run: gcovr --filter src/ --filter include/ --xml -o coverage_c.xml
if: ${{ !startsWith(matrix.python_version, 'pypy') }}
- name: 'Upload PyPy coverage'
uses: codecov/codecov-action@v2.1.0
uses: codecov/codecov-action@v3.1.1
with:
fail_ci_if_error: false
files: ./coverage.xml
if: ${{ startsWith(matrix.python_version, 'pypy') }}
continue-on-error: true
- name: 'Upload СPython coverage'
uses: codecov/codecov-action@v2.1.0
uses: codecov/codecov-action@v3.1.1
with:
fail_ci_if_error: false
files: ./coverage.xml,./coverage_c.xml
Expand All @@ -127,13 +125,13 @@ jobs:
with:
submodules: true
- name: 'Setup Python'
uses: actions/setup-python@v3
uses: actions/setup-python@v4
- name: 'Install packaging tools'
run: python -m pip install -U build pip setuptools
- name: 'Build sdist'
run: python -m build --sdist
- name: 'Upload sdist'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dist
path: dist
Expand All @@ -144,7 +142,7 @@ jobs:
needs: pre-deploy
strategy:
matrix:
python_tag: ['cp37', 'cp38', 'cp39', 'cp310', 'cp311']
python_tag: [ 'cp37', 'cp38', 'cp39', 'cp310', 'cp311' ]
platform: [
{
architecture: 'x86_64',
Expand Down Expand Up @@ -270,7 +268,7 @@ jobs:
with:
submodules: true
- name: 'Setup Python'
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
architecture: ${{ matrix.platform.python_architecture }}
- name: 'Setup QEMU'
Expand All @@ -279,24 +277,24 @@ jobs:
platforms: all
if: ${{ runner.os == 'Linux' }}
- name: 'Build wheels'
uses: pypa/cibuildwheel@v2.11.4
uses: pypa/cibuildwheel@v2.12.1
env:
CIBW_ARCHS: ${{ matrix.platform.architecture }}
CIBW_BUILD: ${{ matrix.python_tag }}-${{ matrix.platform.tag }}
CIBW_BUILD_VERBOSITY: 1
- name: 'Upload wheels'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dist
path: wheelhouse/*.whl

test-distributions:
name: Test distributions
runs-on: ${{ matrix.platform.os }}
needs: ['build-sdist', 'build-wheels']
needs: [ 'build-sdist', 'build-wheels' ]
strategy:
matrix:
python_version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python_version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
platform: [
{
os: 'macos-latest',
Expand Down Expand Up @@ -336,12 +334,12 @@ jobs:
platform: { os: 'windows-latest', python_architecture: 'x64' }
steps:
- name: 'Setup Python'
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
architecture: ${{ matrix.platform.python_architecture }}
- name: 'Download distributions'
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: dist
path: dist
Expand All @@ -355,12 +353,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Download distributions'
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: dist
path: dist
- name: 'PyPI upload'
uses: pypa/gh-action-pypi-publish@v1.5.0
uses: pypa/gh-action-pypi-publish@v1.6.4
with:
packages_dir: dist
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 58d18db

Please sign in to comment.