update workflows

This commit is contained in:
xuhongzuo 2022-11-16 16:15:32 +08:00
parent 828ee8ce4c
commit f62322a181
2 changed files with 13 additions and 8 deletions

View File

@ -43,6 +43,7 @@ jobs:
pip install pytest
pip install coverage
pip install build
pip install coveralls
- name: Build package
run: python -m build
@ -50,7 +51,13 @@ jobs:
- name: Test with pytest
run: |
coverage run --source=pyod -m pytest
- name: coverage report
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls --service=github
# - name: Publish package
# uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
# with:

View File

@ -14,13 +14,16 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda env update --file environment.yml --name base
- name: Lint with flake8
run: |
conda install flake8
@ -28,16 +31,11 @@ jobs:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
conda install pytest
conda install coverage
conda install coveralls
pytest
coverage run --source=deepod -m pytest
- name: coverage report
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls --service=github
coverage run --source=deepod -m pytest