-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.32 KB
/
python-app.yml
File metadata and controls
45 lines (42 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: MESA CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-ml.txt
python -m spacy download xx_ent_wiki_sm
- name: Install Linting & Typing Tools
run: pip install black==26.3.1 ruff==0.15.13 mypy==2.1.0
- name: Check Code Formatting (Black)
run: black --check mesa_memory/ tests/
- name: Lint Code (Ruff)
run: ruff check mesa_memory/ tests/
- name: Type Check (Mypy)
run: mypy mesa_memory/ --ignore-missing-imports --explicit-package-bases
- name: Test with pytest
env:
MESA_OPENAI_API_KEY: "sk-dummy-key"
MESA_ANTHROPIC_API_KEY: "sk-dummy-key"
OPENAI_API_KEY: "sk-dummy-key"
run: |
export PYTHONPATH=.
pytest tests/ --cov=mesa_memory --cov-report=xml --cov-fail-under=85 --ignore=tests/bench
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
fail_ci_if_error: false