Skip to content

[pre-commit.ci] pre-commit autoupdate #238

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #238

Workflow file for this run

---
name: Code Checks
on: # yamllint disable-line rule:truthy
pull_request:
push:
branches: [main]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: 5yutan5/[email protected]
with:
python-version: '3.11'
poetry-install--only: dev
poetry-install--no-root: 'true'
poetry-virtualenvs-in-project: 'true'
# Hack to make pre-commit/action to use virtual env pre-commit.
# pre-commit/action installs pre-commit using following command:
# `python -m pip install pre-commit`
# But `python` doesn't run virtual env interpreter when PATH is default.
# Override PATH to use virtual env interpreter.
# This change force run the virtual env pre-commit.
- name: Set Poetry virtual env path to PATH
run: echo ${{ github.workspace }}/.venv/bin >> $GITHUB_PATH
- uses: pre-commit/[email protected]
- uses: pre-commit-ci/[email protected]
if: always()
pyright:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: 5yutan5/[email protected]
with:
python-version: '3.11'
poetry-install--only: main,test
poetry-virtualenvs-in-project: 'true'
- run: poetry run pip install PyQt6
# Pyright uses dependencies of the interpreter run with the `python`.
# But `python` doesn't run virtual env interpreter when PATH is default.
# Override PATH to use virtual env interpreter.
# This change makes pyright use dependencies of virtual env interpreter.
- name: Set Poetry virtual env path to PATH
run: echo ${{ github.workspace }}/.venv/bin >> $GITHUB_PATH
- uses: jakebailey/pyright-action@v1