Skip to content

Commit eec6003

Browse files
committed
Fix: import errors, all tests passing, coverage enabled
1 parent dd62875 commit eec6003

File tree

5 files changed

+1065
-56
lines changed

5 files changed

+1065
-56
lines changed

.github/workflows/ci.yml

Lines changed: 53 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -12,45 +12,61 @@ jobs:
1212
strategy:
1313
matrix:
1414
python-version: [3.8, 3.9, "3.10", "3.11"]
15-
1615
steps:
17-
- name: Checkout code
18-
uses: actions/checkout@v3
19-
20-
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v4
22-
with:
23-
python-version: ${{ matrix.python-version }}
24-
25-
- name: Install dependencies
26-
run: |
27-
python -m pip install --upgrade pip
28-
pip install -r requirements.txt
29-
pip install pytest pytest-cov
30-
31-
- name: Run tests
32-
run: |
33-
python -m pytest tests/ -v
16+
- name: Checkout code
17+
uses: actions/checkout@v3
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Cache pip
25+
uses: actions/cache@v4
26+
with:
27+
path: ~/.cache/pip
28+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
29+
restore-keys: |
30+
${{ runner.os }}-pip-
31+
32+
- name: Install dependencies
33+
run: |
34+
python -m pip install --upgrade pip
35+
pip install -r requirements.txt
36+
pip install pytest pytest-cov
37+
38+
- name: Run tests with coverage
39+
run: |
40+
python -m pytest tests/ -v --cov=shellrosetta --cov-report=xml
41+
42+
- name: Upload coverage to Codecov
43+
uses: codecov/codecov-action@v4
44+
with:
45+
token: ${{ secrets.CODECOV_TOKEN }}
46+
files: ./coverage.xml
3447

3548
lint:
3649
runs-on: ubuntu-latest
3750
steps:
38-
- name: Checkout code
39-
uses: actions/checkout@v3
40-
41-
- name: Set up Python
42-
uses: actions/setup-python@v4
43-
with:
44-
python-version: "3.11"
45-
46-
- name: Install dependencies
47-
run: |
48-
python -m pip install --upgrade pip
49-
pip install flake8 black mypy
50-
pip install -r requirements.txt
51-
52-
- name: Run linters
53-
run: |
54-
flake8 shellrosetta/ tests/ --max-line-length=88 --ignore=E501,W293,W291,W292,E302,E305,F401,F841 || true
55-
black --check shellrosetta/ tests/ || true
56-
mypy shellrosetta/ --ignore-missing-imports || true
51+
- name: Checkout code
52+
uses: actions/checkout@v3
53+
54+
- name: Set up Python
55+
uses: actions/setup-python@v4
56+
with:
57+
python-version: "3.11"
58+
59+
- name: Install dependencies
60+
run: |
61+
python -m pip install --upgrade pip
62+
pip install flake8 black mypy
63+
pip install -r requirements.txt
64+
65+
- name: Run flake8
66+
run: flake8 shellrosetta/ tests/ --max-line-length=88 --ignore=E501,W293,W291,W292,E302,E305,F401,F841
67+
68+
- name: Run black
69+
run: black --check shellrosetta/ tests/
70+
71+
- name: Run mypy
72+
run: mypy shellrosetta/ --ignore-missing-imports

0 commit comments

Comments
 (0)