Skip to content

Commit

Permalink
ci: split long running steps into separate jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
winstxnhdw committed Jul 25, 2023
1 parent 7ce25af commit 71fd575
Showing 1 changed file with 39 additions and 11 deletions.
50 changes: 39 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,24 @@ on:
- pyproject.toml

jobs:
install:
type-check:
runs-on: windows-latest

steps:
- name: Install KeyWin
run: pip install git+https://github.com/winstxnhdw/KeyWin
- name: Checkout repository
uses: actions/checkout@v3

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

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

- name: Run typechecker
run: pyright

test:
runs-on: windows-latest
Expand All @@ -36,14 +45,33 @@ jobs:
- name: Install the development dependencies
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

build:
runs-on: windows-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

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

- name: Build the extension
run: python setup.py build_ext --inplace

install:
runs-on: windows-latest

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

- name: Mini smoke test
run: python -c "from keywin import keyboard; keyboard.press(0x5B, 0x44)"

0 comments on commit 71fd575

Please sign in to comment.