chore: bump version to 0.6.1rc1 #294
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: Python CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: ['*'] | |
| pull_request: | |
| concurrency: | |
| group: test-${{ github.head_ref }} | |
| cancel-in-progress: true | |
| env: | |
| PYTHONUNBUFFERED: "1" | |
| FORCE_COLOR: "1" | |
| jobs: | |
| build: | |
| name: Python ${{ matrix.python-version }} ${{ matrix.extra-env }} | |
| if: >- | |
| !contains(github.event.head_commit.message, '[skip ci]') | |
| && !contains(github.event.head_commit.message, '[skip tests]') | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| fail-fast: false | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install -r test_requirements.txt | |
| python -m pip install -e . | |
| python -m pip check | |
| - name: Lint | |
| run: | | |
| flake8 -v | |
| - uses: hidakatsuya/action-setup-diff-pdf@v1.4.0 | |
| if: "matrix.python-version == '3.12'" | |
| with: | |
| diff-pdf-version: '0.5' | |
| - uses: actions/cache@v4 | |
| name: Tectonic Cache | |
| if: "matrix.python-version == '3.12'" | |
| with: | |
| path: ~/.cache/Tectonic | |
| key: ${{ runner.os }}-tectonic-${{ hashFiles('**/*.tex') }} | |
| restore-keys: | | |
| ${{ runner.os }}-tectonic- | |
| - uses: wtfjoke/setup-tectonic@v2 | |
| if: "matrix.python-version == '3.12'" | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| biber-version: "latest" | |
| - name: Set environment variables | |
| if: "matrix.python-version == '3.12'" | |
| run: | | |
| echo "TEST_GXPDF=1" >> "$GITHUB_ENV" | |
| - name: Test | |
| run: | | |
| PYTEST_ARGS=(); | |
| PYTEST_ARGS+=(-n 2 --dist loadscope); | |
| if [[ ! -z "$PYTEST_K_FILTER" ]]; then | |
| PYTEST_ARGS+=(-k "$PYTEST_K_FILTER"); | |
| fi; | |
| pytest \ | |
| -vv --durations=50 \ | |
| --cov=galgebra \ | |
| --nbval examples/ipython/ \ | |
| --nbval examples/primer/ \ | |
| test \ | |
| --nbval-current-env \ | |
| --nbval-sanitize-with test/.nbval_sanitize.cfg \ | |
| "${PYTEST_ARGS[@]}" | |
| - name: Upload coverage to Codecov | |
| if: "matrix.python-version == '3.12'" | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - uses: actions/upload-artifact@v4 | |
| if: "matrix.python-version == '3.12' && failure()" | |
| with: | |
| name: PDF-diffs | |
| path: test/diff | |
| release: | |
| name: Create release and send to PyPI | |
| needs: build | |
| if: >- | |
| github.ref_type == 'tag' | |
| && startsWith(github.ref, 'refs/tags/v') | |
| && !contains(github.event.head_commit.message, '[skip ci]') | |
| && !contains(github.event.head_commit.message, '[no release]') | |
| runs-on: ubuntu-latest | |
| # https://github.com/pypa/gh-action-pypi-publish/tree/release/v1/?tab=readme-ov-file#trusted-publishing | |
| permissions: | |
| id-token: write | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/galgebra | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install build | |
| run: | | |
| python -m pip install build | |
| - name: Build distributions | |
| run: | | |
| python -m build | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |