Skip to content

Commit

Permalink
add overall checks and ci
Browse files Browse the repository at this point in the history
  • Loading branch information
lalmei committed Nov 23, 2024
1 parent 667de5c commit bbd73ce
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 1 deletion.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: pr_check

on: [push, pull_request]

jobs:
test:
name: Test - ${{ matrix.python-version }} - ${{matrix.os}}
runs-on: ${{matrix.os}}

strategy:
matrix:
python-version: ["3.11", "3.12"]
os: [ubuntu-latest, macOs-latest]
fail-fast: false

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 the latest version of uv
uses: astral-sh/setup-uv@v3
with:
version: "latest"
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- name: Check if cache used
if: steps.setup-uv.outputs.cache-hit == 'true'
run: echo "Cache was restored"

- name: Set up python env
run: uv sync --dev

- name: Run Checks
run: make for
- name: Run tests
# For example, using `pytest`
run: make test
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ agml/models/training/*.log
agml/models/training/*.err
agml/models/training/*.out
agml/models/training/*.csv
.*/
# .*/
/
*.pptx
.ruff_cache
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ test: $(test.python) $(src.python) ## Run tests

# Quality Checks

.PHONY: checks
checks: check-format lint check-types docstring-coverage


.PHONY: check-types
check-types: ## Run mypy to check type definitions.
uv run mypy --config=config/mypy.ini $(src.python) $(test.python)
Expand Down

0 comments on commit bbd73ce

Please sign in to comment.