-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
32 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,42 +51,44 @@ jobs: | |
cache: "pip" | ||
cache-dependency-path: '**/setup.py' | ||
|
||
- name: Install Python dependencies | ||
run: | | ||
python${{ matrix.python-version }} -m pip install --upgrade pip pip-tools build setuptools setuptools_scm wheel | ||
python${{ matrix.python-version }} -m piptools sync --user requirements/ubuntu-latest_py${{ matrix.python-version }}_extras.txt | ||
# Using non-editable install for testing building of MANIFEST files | ||
python${{ matrix.python-version }} -m pip install --no-deps . | ||
#- name: Install Python dependencies | ||
# run: | | ||
# python${{ matrix.python-version }} -m pip install --upgrade pip pip-tools setuptools setuptools_scm | ||
# python${{ matrix.python-version }} -m piptools sync --user requirements/ubuntu-latest_py${{ matrix.python-version }}_extras.txt | ||
# # Using non-editable install for testing building of MANIFEST files | ||
# python${{ matrix.python-version }} -m pip install --no-deps . | ||
|
||
- name: linting | ||
run: | | ||
black --version | ||
black --check --diff --color matminer | ||
flake8 --version | ||
flake8 --count --show-source --statistics matminer | ||
# exit-zero treats all errors as warnings. | ||
flake8 --count --exit-zero --max-complexity=20 --statistics matminer | ||
# mypy --version | ||
# rm -rf .mypy_cache | ||
# mypy matminer | ||
# pydocstyle --count matminer | ||
# pylint matminer | ||
#- name: linting | ||
# run: | | ||
# black --version | ||
# black --check --diff --color matminer | ||
# flake8 --version | ||
# flake8 --count --show-source --statistics matminer | ||
# # exit-zero treats all errors as warnings. | ||
# flake8 --count --exit-zero --max-complexity=20 --statistics matminer | ||
# # mypy --version | ||
# # rm -rf .mypy_cache | ||
# # mypy matminer | ||
# # pydocstyle --count matminer | ||
# # pylint matminer | ||
|
||
- name: Start MongoDB | ||
uses: supercharge/[email protected] | ||
with: | ||
mongodb-version: ${{ matrix.mongodb-version }} | ||
#- name: Start MongoDB | ||
# uses: supercharge/[email protected] | ||
# with: | ||
# mongodb-version: ${{ matrix.mongodb-version }} | ||
|
||
- name: Run tests | ||
run: | | ||
# Sleeping to allow mongo a bit more time to boot, avoiding connect errors | ||
sleep 10 | ||
mongo localhost/admin --eval 'db.createUser({user: "admin",pwd: "password",roles: [ { role: "root", db: "admin" } ]})' | ||
python${{ matrix.python-version }} -m pytest --cov=matminer matminer | ||
#- name: Run tests | ||
# run: | | ||
# # Sleeping to allow mongo a bit more time to boot, avoiding connect errors | ||
# sleep 10 | ||
# mongo localhost/admin --eval 'db.createUser({user: "admin",pwd: "password",roles: [ { role: "root", db: "admin" } ]})' | ||
# python${{ matrix.python-version }} -m pytest --cov=matminer matminer | ||
|
||
- name: Build package | ||
if: matrix.python-version == 3.9 | ||
run: python${{ matrix.python-version }} -m build | ||
run: | | ||
python${{ matrix.python-version }} -m pip install --upgrade pip build setuptools setuptools_scm wheel | ||
python${{ matrix.python-version }} -m build | ||
- name: Publish distribution 📦s to Test PyPI | ||
if: matrix.python-version == 3.9 | ||
|