Ail 162/feature/setup precommit basic linting #42
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
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 | |
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 |