Use new convention for validity mask #118
Workflow file for this run
This file contains hidden or 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 Pipeline | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - '**' | |
| jobs: | |
| build-env: | |
| name: Run CI | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Dependencies | |
| shell: bash | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| # Debug: check slurp and pygments are installed | |
| python -c "import slurp; print('slurp imported from:', slurp.__file__)" | |
| python -c "import pygments; print('pygments version:', pygments.__version__)" | |
| - name: Run Black & Isort | |
| shell: bash | |
| run: | | |
| black --check --diff slurp tests | |
| isort slurp tests --check --diff | |
| continue-on-error: true | |
| - name: Run Pylint | |
| shell: bash | |
| run: | | |
| pylint --recursive=y --disable=all --fail-under=10 --enable=too-many-statements,too-many-nested-blocks slurp | |
| - name: Run McCabe Complexity Check | |
| shell: bash | |
| run: | | |
| ./continuous_integration/scripts/check_mccabe_complexity.sh 25 slurp | |
| - name: Run CI Tests with Coverage | |
| shell: bash | |
| run: | | |
| pytest -m ci \ | |
| --cov=slurp \ | |
| --cov-report=xml:.ci-reports-slurp/coverage_slurp.xml \ | |
| --cov-report html:cov_html_slurp \ | |
| --cov-report=term \ | |
| --junitxml=pytest-results-slurp.xml \ | |
| --config config_tests_ci.json \ | |
| --main_config main_config_tests_ci.json -s | |
| - name: Upload Coverage Report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report-slurp | |
| path: | | |
| .ci-reports-slurp/ | |
| cov_html_slurp/ | |
| pytest-results-slurp.xml | |
| build_wheels: | |
| name: Build wheels on ubuntu-latest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install cibuildwheel | |
| run: python -m pip install cibuildwheel==2.22.0 | |
| - name: Build wheels | |
| env: | |
| CIBW_BUILD: "cp31*-manylinux_x86_64 cp31*-musllinux_x86_64" | |
| run: python -m cibuildwheel --output-dir dist --debug | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: cibw-wheels | |
| path: ./wheelhouse/*.whl | |
| build_sdist: | |
| name: Build source distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build sdist | |
| run: pipx run build --sdist | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: cibw-sdist | |
| path: dist/*.tar.gz | |
| upload_pypi: | |
| name: Publish package on pypi | |
| needs: [ build-env, build_wheels, build_sdist ] | |
| runs-on: ubuntu-latest | |
| environment: pypi | |
| permissions: | |
| id-token: write | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: cibw-* | |
| path: dist | |
| merge-multiple: true | |
| - uses: pypa/gh-action-pypi-publish@release/v1 |