Skip to content

Commit

Permalink
chore: Check type and poetry config in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ar90n committed Apr 28, 2022
1 parent 1a85905 commit 2bf22c0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 26 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: npm
- name: Setup pyright
run: npm install -g pyright
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
Expand All @@ -49,6 +55,10 @@ jobs:
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python - --preview
poetry install
- name: Type check
run: |
poetry run pyright --warnings
- name: Tests
run: |
poetry run coverage run --source alfort_dom -m pytest -v --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}.xml
Expand Down
16 changes: 5 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ ci:
# submodules: true

repos:
- repo: https://github.com/python-poetry/poetry
rev: '' # add version here
hooks:
- id: poetry-check
- id: poetry-lock
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
Expand Down Expand Up @@ -77,14 +82,3 @@ repos:
hooks:
- id: flake8
name: PEP8

- repo: local
hooks:
- id: pyright
args: [ --warnings ]
name: pyright
entry: pyright
language: node
pass_filenames: false
types: [python]
additional_dependencies: ['[email protected]']
19 changes: 4 additions & 15 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2bf22c0

Please sign in to comment.