Skip to content

[FEATURE] Adds type validation GitHub action #52

[FEATURE] Adds type validation GitHub action

[FEATURE] Adds type validation GitHub action #52

Workflow file for this run

name: Code Quality and Tests
on:
push:
branches: ["master", "main"]
pull_request:
jobs:
pre_commit:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install Pre-commit Dependencies
run: pip install pre-commit
- name: Run Pre-commit Hooks
run: pre-commit run --all-files
type_check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install Test Dependencies
run: pip install .[test]
- name: Type Checking with Mypy
run: mypy
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Test Dependencies
run: pip install .[test]
- name: Run Tests
run: pytest --color=yes --cov=learnosity_sdk