Skip to content

Commit

Permalink
ci: add linting step
Browse files Browse the repository at this point in the history
  • Loading branch information
winstxnhdw committed Jun 21, 2023
1 parent 969cec3 commit ab1c5a2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ permissions:

jobs:
auto-merge:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
runs-on: ubuntu-latest

steps:
- name: Auto-merge Dependabot PRs
Expand Down
25 changes: 12 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Test
on:
push:
paths:
- 'keywin/**'
- 'tests/**'
- keywin/**
- tests/**
- .github/workflows/main.yml
- setup.py
- pyproject.toml
Expand All @@ -14,17 +14,13 @@ jobs:
runs-on: windows-latest

steps:
- name: Create requirements.txt
run: echo "keywin @ git+https://github.com/winstxnhdw/KeyWin@${{ github.sha }}" > requirements.txt

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
python-version: 3.11

- name: Install KeyWin
run: pip install -r requirements.txt
run: pip install git+https://github.com/winstxnhdw/KeyWin

- name: Mini smoke test
run: python -c "from keywin import keyboard; keyboard.press(0x5B, 0x44)"
Expand All @@ -39,17 +35,20 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
python-version: 3.11
cache: pip

- name: Install the development dependencies
run: pip install -r requirements.dev.txt
run: pip install -r requirements.txt

- name: Build the extension
run: python setup.py build_ext --inplace
- name: Run linter
run: pylint $(git ls-files '*.py')

- name: Run typechecker
run: pyright

- name: Run tests
run: pytest

- name: Build the extension
run: python setup.py build_ext --inplace
File renamed without changes.
File renamed without changes.

0 comments on commit ab1c5a2

Please sign in to comment.