MASTD-7260: Reorder function calls #111
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 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - '**' | |
| pull_request: {} | |
| env: | |
| COLUMNS: 150 | |
| UV_FROZEN: true | |
| FORCE_COLOR: 1 | |
| jobs: | |
| lint: | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| name: Lint ${{ matrix.python-version }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12', '3.13'] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| # Installing pip is required for the pre-commit action: | |
| run: | | |
| uv sync --dev | |
| uv pip install pip | |
| - uses: pre-commit/[email protected] | |
| with: | |
| extra_args: --all-files --verbose | |
| env: | |
| SKIP: no-commit-to-branch | |
| check: | |
| if: always() | |
| permissions: | |
| contents: read | |
| outputs: | |
| result: ${{ steps.all-green.outputs.result }} | |
| needs: | |
| - lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Ensure all checks pass | |
| uses: re-actors/alls-green@release/v1 | |
| id: all-green | |
| with: | |
| jobs: ${{ toJSON(needs) }} | |
| release: | |
| needs: [check] | |
| if: needs.check.outputs.result == 'success' && startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| environment: release | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: '3.12' | |
| - name: Check version | |
| id: check-tag | |
| uses: samuelcolvin/check-python-version@v5 | |
| with: | |
| version_file_path: pbsmmapi/__init__.py | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Build library | |
| run: uv build | |
| - name: Upload package to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |