build(deps-dev): bump ty from 0.0.1a14 to 0.0.1a27 #50
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: package | |
| on: | |
| push: | |
| branches: main | |
| paths: | |
| - '.github/workflows/package.yml' | |
| - 'relay/**' | |
| - 'tests/**' | |
| - 'pyproject.toml' | |
| - 'Makefile' | |
| pull_request: | |
| branches: main | |
| paths: | |
| - '.github/workflows/package.yml' | |
| - 'relay/**' | |
| - 'tests/**' | |
| - 'pyproject.toml' | |
| - 'Makefile' | |
| release: | |
| types: [published] | |
| env: | |
| UV_VERSION: "0.7.20" | |
| PYTHON_VERSION: "3.11" | |
| jobs: | |
| install: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python: ['3.11', '3.12', '3.13'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| architecture: x64 | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| - name: Install the engine | |
| run: make install | |
| - name: Check that we can import the engine | |
| run: | | |
| python -c "import relay; print(relay.__version__)" | |
| - name: Run the CLI | |
| run: relay --help | |
| code-quality: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| architecture: x64 | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/uv | |
| key: uv-${{ runner.os }}-${{ hashFiles('pyproject.toml') }} | |
| - name: Run ruff | |
| run: | | |
| make install-quality | |
| ruff --version | |
| make lint-check | |
| - name: Run ty | |
| run: make typing-check | |
| deps-sync: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| architecture: x64 | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| - name: Run dependency sync checker | |
| run: make deps-check | |
| test: | |
| if: github.event_name != 'release' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| architecture: x64 | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/uv | |
| key: uv-${{ runner.os }}-${{ hashFiles('pyproject.toml') }}-test | |
| - name: Run tests | |
| run: | | |
| make install-test | |
| make test | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-reports | |
| path: ./coverage.xml | |
| codecov-upload: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/download-artifact@v4 | |
| - uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| flags: unittests | |
| directory: ./coverage-reports | |
| fail_ci_if_error: true | |
| build: | |
| if: github.event_name == 'pull_request' | |
| needs: install | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python: ['3.11', '3.12', '3.13'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| architecture: x64 | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| - name: Build the package | |
| run: make build | |
| publish: | |
| if: github.event_name == 'release' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| # For PyPI's trusted publishing. | |
| id-token: write | |
| outputs: | |
| package_version: ${{ steps.set_version.outputs.package_version }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| architecture: x64 | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| - name: Set package version | |
| id: set_version | |
| run: | | |
| RELEASE_TAG=${{ github.ref_name }} | |
| # Strip "v" prefix | |
| BUILD_VERSION=${RELEASE_TAG#v} | |
| # Replace SemVer pre-release separators with PEP440 compatible ones | |
| BUILD_VERSION=${BUILD_VERSION//-alpha./a} | |
| BUILD_VERSION=${BUILD_VERSION//-beta./b} | |
| BUILD_VERSION=${BUILD_VERSION//-rc./rc} | |
| echo "package_version=${BUILD_VERSION}" >> $GITHUB_OUTPUT | |
| echo "BUILD_VERSION=${BUILD_VERSION}" >> $GITHUB_ENV | |
| - name: Publish to PyPI | |
| run: | | |
| make set-version | |
| make build && make publish | |
| verify-publish: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python: ['3.11', '3.12', '3.13'] | |
| needs: publish | |
| steps: | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| architecture: x64 | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| - name: Install package | |
| run: | | |
| uv pip install --system relaycli==${{ needs.publish.outputs.package_version }} | |
| relay version |