A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

97 lignes
2.5 KiB

  1. name: Build
  2. on: [push, pull_request]
  3. jobs:
  4. pre-commit:
  5. name: Run pre-commit hooks
  6. runs-on: ubuntu-latest
  7. steps:
  8. - uses: actions/checkout@v3
  9. - uses: astral-sh/setup-uv@v5
  10. - uses: actions/setup-python@v5
  11. with:
  12. python-version-file: pyproject.toml
  13. - name: Install the project
  14. run: uv sync --locked --dev
  15. - name: Run pre-commit hooks
  16. uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd
  17. build-wheels:
  18. name: Build wheels for ${{ matrix.os }}
  19. runs-on: ${{ matrix.runs-on }}
  20. strategy:
  21. matrix:
  22. include:
  23. - os: linux-intel
  24. runs-on: ubuntu-latest
  25. - os: linux-arm
  26. runs-on: ubuntu-24.04-arm
  27. - os: windows-intel
  28. runs-on: windows-latest
  29. - os: macos-intel
  30. runs-on: macos-13
  31. - os: macos-arm
  32. runs-on: macos-latest
  33. steps:
  34. - uses: actions/checkout@v4
  35. with:
  36. fetch-depth: 0
  37. - name: Build wheels
  38. uses: pypa/cibuildwheel@v3.0.0
  39. - uses: actions/upload-artifact@v4
  40. with:
  41. name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
  42. path: ./wheelhouse/*.whl
  43. - name: Get coverage files
  44. if: matrix.os == 'linux-intel'
  45. id: get-coverage-files
  46. run: |
  47. FILES=$(find ./wheelhouse -type f -name '.coverage*' -printf '%p ')
  48. echo "Found coverage files: $FILES"
  49. echo "files=$FILES" >> $GITHUB_OUTPUT
  50. - name: Upload to Coveralls
  51. if: matrix.os == 'linux-intel'
  52. uses: coverallsapp/github-action@v2
  53. with:
  54. files: ${{ steps.get-coverage-files.outputs.files }}
  55. build-sdist:
  56. name: Build source distribution
  57. runs-on: ubuntu-latest
  58. steps:
  59. - uses: actions/checkout@v4
  60. with:
  61. fetch-depth: 0
  62. - name: Build sdist
  63. run: pipx run build --sdist
  64. - uses: actions/upload-artifact@v4
  65. with:
  66. name: cibw-sdist
  67. path: dist/*.tar.gz
  68. upload-pypi:
  69. name: Publish to PyPI
  70. needs: [pre-commit, build-wheels, build-sdist]
  71. runs-on: ubuntu-latest
  72. environment: pypi
  73. permissions:
  74. id-token: write
  75. if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
  76. steps:
  77. - uses: actions/download-artifact@v4
  78. with:
  79. pattern: cibw-*
  80. path: dist
  81. merge-multiple: true
  82. - uses: pypa/gh-action-pypi-publish@release/v1