Skip to content

Commit 4df899b

Browse files
authored
Merge pull request #35 from calpolyccg/more-ci-checks
Add more checks to CI pipeline
2 parents bca214e + 8f6b359 commit 4df899b

File tree

2 files changed

+40
-10
lines changed

2 files changed

+40
-10
lines changed

.github/workflows/CI.yaml

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,15 @@ jobs:
5050
auto-update-conda: false
5151
auto-activate-base: false
5252
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
53-
54-
- name: Install MDSAPT package
55-
# conda setup requires this special shell
53+
54+
- name: Type-check
5655
shell: bash -l {0}
5756
run: |
58-
python -m pip install . --no-deps
59-
conda list
57+
pyright mdsapt
6058
61-
# TODO: possibly integrate this step with meta.yml?
6259
- name: Run tests
63-
# conda setup requires this special shell
6460
shell: bash -l {0}
6561
run: |
66-
pip install pytest-cov
6762
pytest -v ./mdsapt --cov=mdsapt --cov-report=xml
6863
6964
- name: Upload CodeCov
@@ -73,6 +68,12 @@ jobs:
7368
flags: unittests
7469
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
7570

71+
- name: Install MDSAPT package
72+
shell: bash -l {0}
73+
run: |
74+
python -m pip install . --no-deps
75+
conda list
76+
7677
package:
7778
name: Packaging py${{ matrix.python-version }}/${{ matrix.os }}
7879
runs-on: ${{ matrix.os }}
@@ -162,3 +163,23 @@ jobs:
162163
shell: bash -l {0}
163164
run: >
164165
python3 -c "import mdsapt"
166+
167+
lint-and-format:
168+
# These checks are much faster and don't actually need to install any packages.
169+
name: Run fast checks over code
170+
runs-on: ubuntu-latest
171+
172+
steps:
173+
- uses: actions/checkout@v2
174+
175+
- name: Install formatter and linter
176+
run: |
177+
pip install autopep8 pylint
178+
179+
- name: Lint code
180+
run: |
181+
pylint mdsapt
182+
183+
- name: Ensure formatting
184+
run: |
185+
autopep8 -r mdsapt --diff --exit-code

environment.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ channels:
66
- conda-forge
77
- defaults
88
dependencies:
9-
- mdanalysis>=2.0.0, <2.1
10-
- nglview>=3.0.3, <3.1
9+
- mdanalysis
1110
- numpy
1211
- openmm
1312
- pandas
@@ -17,3 +16,13 @@ dependencies:
1716
- pytest-cov
1817
- pyyaml
1918
- rdkit
19+
20+
# Optional deps
21+
- nglview
22+
23+
# Development deps
24+
- autopep8
25+
- pyright # type-checking
26+
- pylint
27+
- pytest
28+
- pytest-cov

0 commit comments

Comments
 (0)