From 71fd5756ba1929b8f59a32b8c8882eb226eb378c Mon Sep 17 00:00:00 2001 From: winstxnhdw Date: Tue, 25 Jul 2023 13:12:02 +0800 Subject: [PATCH] ci: split long running steps into separate jobs --- .github/workflows/main.yml | 50 +++++++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cfa8225..e1c6376 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -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)"