fix for new ruff non-empty-init-module rule
#1415
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: check and publish | |
| on: push | |
| permissions: | |
| contents: "write" | |
| packages: "write" | |
| pull-requests: "read" | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # ideally we would use the version from .python-version when referring to the latest version, but we currently pin | |
| # python 3.13 for local development due to https://github.com/microsoft/vscode-python/issues/25581 | |
| python_version: ["3.10", "3.14"] | |
| os: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
| robot_version: ["6.1.1", "from lockfile"] | |
| pytest_version: ["8.0", "8.4.2", "from lockfile"] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python_version }} | |
| - run: ./pw uv python pin ${{ matrix.python_version }} | |
| - run: ./pw uv sync | |
| - run: ./pw uv add robotframework==${{ matrix.robot_version }} | |
| if: ${{ matrix.robot_version != 'from lockfile' }} | |
| - run: ./pw uv add pytest==${{ matrix.pytest_version }} | |
| if: ${{ matrix.pytest_version != 'from lockfile' }} | |
| - run: ./pw test | |
| static_checks: | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| - run: ./pw uv sync --locked | |
| - run: ./pw basedpyright | |
| - run: ./pw ty | |
| if: always() | |
| - name: ruff check | |
| if: always() | |
| run: ./pw uv run ruff check --output-format github | |
| - name: ruff format | |
| if: always() | |
| run: ./pw uv run ruff format --check --diff | |
| - run: ./pw pylint --output-format=github | |
| if: always() | |
| - run: ./pw robotcode | |
| if: always() | |
| - run: ./pw robocop_lint | |
| if: always() | |
| - run: ./pw robocop_format | |
| if: always() | |
| - run: ./pw dprint | |
| if: always() | |
| - run: ./pw tach | |
| if: always() | |
| - run: ./pw uv run mkdocs build --strict | |
| if: always() | |
| publish: | |
| runs-on: "ubuntu-latest" | |
| if: github.ref == 'refs/heads/master' | |
| needs: | |
| - static_checks | |
| - test | |
| permissions: | |
| id-token: write | |
| contents: write | |
| packages: write | |
| pull-requests: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: ./pw uv build | |
| - run: ./pw uv publish | |
| - name: get version number | |
| id: current-version | |
| # https://github.com/astral-sh/uv/issues/6298 | |
| run: echo ::set-output name=CURRENT_VERSION::$(./pw uv version --short) | |
| - uses: marvinpinto/action-automatic-releases@v1.2.1 | |
| with: | |
| # needs to be a PAT otherwise it won't trigger the action to deploy the docs | |
| repo_token: ${{ secrets.GH_TOKEN }} | |
| prerelease: false | |
| files: dist/* | |
| automatic_release_tag: ${{ steps.current-version.outputs.CURRENT_VERSION }} |