update pdm lockfile #1193
Workflow file for this run
This file contains 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: | |
python_version: ["3.9", "3.13"] | |
# pinning macos version because apparently newer versions of macos don't work with lxml | |
# https://stackoverflow.com/a/76776773 | |
os: ["ubuntu-latest", "macos-12", "windows-latest"] | |
robot_version: ["6.1.1", "from lockfile"] | |
pytest_version: ["8.0", "from lockfile"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python_version }} | |
- run: ./pw pdm install | |
- run: ./pw pdm add robotframework==${{ matrix.robot_version }} | |
if: ${{ matrix.robot_version != 'from lockfile' }} | |
- run: ./pw pdm add pytest==${{ matrix.pytest_version }} | |
if: ${{ matrix.pytest_version != 'from lockfile' }} | |
- run: ./pw pdm test | |
static_checks: | |
strategy: | |
fail-fast: false | |
matrix: | |
python_version: ["3.9", "3.13"] | |
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python_version }} | |
- run: ./pw pdm lock --check | |
- run: ./pw pdm install | |
- run: ./pw pdm run typecheck | |
- name: ruff check | |
if: always() | |
run: ./pw pdm run ruff check --output-format github | |
- name: ruff format | |
if: always() | |
run: ./pw pdm run ruff format --check --diff | |
- run: ./pw pdm run pylint -- --output-format=github | |
if: always() | |
- run: ./pw pdm run robocop | |
if: always() | |
- run: ./pw pdm run robotidy | |
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 pdm publish | |
- name: get version number | |
id: current-version | |
run: echo ::set-output name=CURRENT_VERSION::$(./pw pdm show --version) | |
- uses: marvinpinto/[email protected] | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
prerelease: false | |
files: dist/* | |
automatic_release_tag: ${{ steps.current-version.outputs.CURRENT_VERSION }} |