Skip to content

Commit

Permalink
update test configs (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
njzjz authored Nov 25, 2022
1 parent 8a61724 commit 408a981
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,11 @@ jobs:
name: Test with tox
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v1
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.10'
architecture: 'x64'
- name: pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key:
${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- run: pip install tox
- run: pip install tox tox-gh-actions
- run: tox
- uses: codecov/codecov-action@v3
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies = [
'scikit-learn',
'ase',
'gaussianrunner>=1.0.20',
'tqdm',
'tqdm>=4.9.0',
'coloredlogs',
'lz4',
'dpdata>=0.1.2',
Expand Down
14 changes: 9 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
[tox]
envlist = py38
envlist = py37,py38,py39,py310,py311

[testenv]
extras = test
passenv = CI CODECOV_* TOXENV GITHUB_*
setenv =
DEBUG = 1
usedevelop = true
deps =
codecov>=1.4.0
commands =
pytest tests --cov --cov-config={toxinidir}/tox.ini
- codecov -e TOXENV
pytest tests --cov --cov-report term --cov-report xml --cov-config={toxinidir}/tox.ini

[coverage:run]
plugins = Cython.Coverage
Expand All @@ -20,3 +17,10 @@ plugins = Cython.Coverage
show_missing = true
omit = *test*

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311

0 comments on commit 408a981

Please sign in to comment.