1+ name : Test and Lint
2+
3+ on :
4+ push :
5+ branches : [ main, develop ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ test :
11+ runs-on : ${{ matrix.os }}
12+ strategy :
13+ matrix :
14+ os : [ubuntu-latest, windows-latest, macos-latest]
15+ python-version : [3.8, 3.9, "3.10", "3.11", "3.12"]
16+
17+ steps :
18+ - name : Checkout code
19+ uses : actions/checkout@v3
20+
21+ - name : Set up Python ${{ matrix.python-version }}
22+ uses : actions/setup-python@v4
23+ with :
24+ python-version : ${{ matrix.python-version }}
25+
26+ - name : Install dependencies
27+ run : |
28+ python -m pip install --upgrade pip
29+ pip install -r requirements.txt
30+ pip install pytest pytest-cov
31+ pip install .
32+
33+ - name : Run tests
34+ run : |
35+ python -m pytest tests/ -v --cov=shellrosetta --cov-report=xml
36+
37+ - name : Upload coverage to Codecov
38+ uses : codecov/codecov-action@v3
39+ with :
40+ file : ./coverage.xml
41+ flags : unittests
42+ name : codecov-umbrella
43+
44+ lint :
45+ runs-on : ubuntu-latest
46+ steps :
47+ - name : Checkout code
48+ uses : actions/checkout@v3
49+
50+ - name : Set up Python
51+ uses : actions/setup-python@v4
52+ with :
53+ python-version : " 3.11"
54+
55+ - name : Install dependencies
56+ run : |
57+ python -m pip install --upgrade pip
58+ pip install flake8 black mypy pytest pytest-cov
59+ pip install -r requirements.txt
60+ pip install .
61+
62+ - name : Run linters
63+ run : |
64+ # Run flake8 with more lenient settings
65+ flake8 shellrosetta/ tests/ --max-line-length=88 --ignore=E501,W293,W291,W292,E302,E305,F401,F841 || true
66+
67+ # Run black to check formatting
68+ black --check shellrosetta/ tests/ || true
69+
70+ # Run mypy with basic checks
71+ mypy shellrosetta/ --ignore-missing-imports || true
0 commit comments