Bump pytest from 9.0.2 to 9.0.3 #1049
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: | |
| workflow_dispatch: | |
| pull_request: | |
| merge_group: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - v* | |
| jobs: | |
| lint: | |
| name: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: ".python-version" | |
| - name: Install the project | |
| run: uv sync --all-extras --dev | |
| - name: Ruff check | |
| run: uv run ruff check src tests | |
| - name: Ruff format | |
| run: uv run ruff format --check src tests | |
| test: | |
| name: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: ".python-version" | |
| - name: Install the project | |
| run: uv sync --all-extras --dev | |
| - name: Run tests | |
| run: uv run pytest | |
| - name: Execute notebooks | |
| # Sanity check if the notebooks can be executed | |
| run: find docs/notebooks/*.ipynb -maxdepth 1 -type f | xargs -L1 uv run jupyter nbconvert --to notebook --execute | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| test-release: | |
| if: contains(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| needs: | |
| - lint | |
| - test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: ".python-version" | |
| - name: Build | |
| run: uv build --no-sources | |
| - name: Test release can be installed and imported | |
| run: | | |
| uv venv | |
| uv pip install dist/proteingym_base-*.whl | |
| uv run --with proteingym_base --no-project --no-cache -- python -c "import proteingym.base" | |
| github-release: | |
| runs-on: ubuntu-latest | |
| needs: test-release | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Hatch | |
| uses: pypa/hatch@install | |
| - name: Get version | |
| id: get_version | |
| run: echo ::set-output name=VERSION::$(hatch version) | |
| - name: Create GitHub release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: v${{ steps.get_version.outputs.VERSION }} | |
| body: ${{ github.event.head_commit.message }} | |
| prerelease: ${{ contains(steps.get_version.outputs.VERSION, 'rc') || contains(steps.get_version.outputs.VERSION, 'b') }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| generate_release_notes: true |