Skip to content

Commit

Permalink
Add action for validation and move pyright from pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
uittenbroekrobbert committed Jun 14, 2024
1 parent c5bd1d8 commit ca651da
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/code-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: continuous-integration

on:
push:
branches:
- '**'
pull_request:
branches:
- 'main'

env:
POETRY_CACHE_DIR: ~/.cache/pypoetry
PYTHON_VERSION: "3.11"

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install poetry
run: pipx install poetry

- name: Set up Python ${{ env.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: "poetry"

- name: Install dependencies
run: poetry build

- name: run ruff
run: poetry run ruff check --output-format=github

- name: Run format
run: poetry run ruff format --check

- name: Run pyright
run: poetry run pyright
4 changes: 0 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ repos:
language: system
pass_filenames: false
types: [python]
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.367
hooks:
- id: pyright

ci:
autofix_prs: false
Expand Down

0 comments on commit ca651da

Please sign in to comment.