Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shish committed Sep 3, 2024
1 parent cf3c61f commit 88da5fc
Showing 1 changed file with 40 additions and 11 deletions.
51 changes: 40 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ on:
pull_request:

jobs:
build:
pytest:
name: Python ${{ matrix.python-version }}

runs-on: ubuntu-24.04
strategy:
max-parallel: 4
matrix:
python-version: ["3.8"]

steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -31,14 +29,45 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -e '.[dev]'
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 sikuli --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 sikuli --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pip install pytest
xvfb-run --auto-servernum pytest
black:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
options: "--check --diff"
src: "./sikuli"

ruff:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e '.[dev]'
- name: Lint with Ruff
run: ruff check --output-format=github sikuli

mypy:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e '.[dev]'
- name: Lint with MyPy
run: mypy

0 comments on commit 88da5fc

Please sign in to comment.