name: Checks

on:
  pull_request:
  push:
    branches:
      - stable
      - dev

jobs:
  checks:
    runs-on: ubuntu-latest

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

    - name: Set up Python
      uses: actions/setup-python@v3
      with:
        python-version: '3.11'

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        python -m pip install -r requirements.txt
        python -m pip install mypy pytest ruff

    - name: Type Checking
      run: |
        python -m mypy --install-types --non-interactive .

    - name: Linting
      run: |
        ruff check cutekit

    - name: Unit Testing
      run: |
        python -m pytest