Skip to content

Commit

Permalink
Merge 1066b62 into 1be9c78
Browse files Browse the repository at this point in the history
  • Loading branch information
weixuanfu committed Feb 5, 2021
2 parents 1be9c78 + 1066b62 commit de77364
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 11 deletions.
5 changes: 3 additions & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[run]
; source =
relative_files = True
; source =
; ai
; machine
; lab/pyutils
Expand All @@ -12,5 +13,5 @@ parallel = True
; the first path is the path on the local (travis) filesystem
; the second path is the path as it appears within the Docker container
source =
$TRAVIS_BUILD_DIR
$GITHUB_WORKSPACE
/appsrc/
45 changes: 38 additions & 7 deletions .github/workflows/pennai_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ jobs:
# Runs a set of commands using the runners shell
- name: Run Unit Tests
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git lfs fetch --all
docker run -v $(pwd):/appsrc -w /appsrc pennai_unit_tester mocha machine/test/test.js
Expand All @@ -68,6 +66,12 @@ jobs:
ai/tests/lab_*.py \
ai/tests/test_re*.py \
ai/tests/test_k*utils.py
coverage combine
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit Test for webapp

build_pypkg:
name: Unit Tests for scikit-learn API
Expand All @@ -80,18 +84,45 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: '3.7'

- name: Build Docker Images
run: |
pip install coveralls
docker-compose -f ./docker-compose-unit-test.yml build -m 8g
# Runs a set of commands using the runners shell
- name: Run Unit Tests
run: |
git lfs fetch --all
git lfs pull
docker run -v $(pwd):/appsrc -w /appsrc pennai_unit_tester nosetests -s -v ai/tests/test_sklearn_api.py
# Run deployment steps if pervious steps are success
docker run -v $(pwd):/appsrc -w /appsrc pennai_unit_tester coverage run -m nose -s -v ai/tests/test_sklearn_api.py
coverage combine
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit Test for scikit-learn api

coveralls_finish:
name: Coveralls Done
needs: [build_web_app, build_pypkg]
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true

deploy_pypkg:
name: Deploy python package
needs: build_pypkg
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install dependencies
if: ${{ github.event_name == 'release' && github.event.action == 'published' }}
run: |
Expand All @@ -108,7 +139,7 @@ jobs:
build_docs:
name: Doc Builder
needs: [build_int_test, build_web_app]
needs: [build_int_test, build_web_app, build_pypkg]
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ jobs:
ai/tests/lab_*.py
ai/tests/test_re*.py
ai/tests/test_k*utils.py"
- coverage combine
#- coverage combine
#- docker cp pennai_unit_tester:/.coverage ./
- coveralls
#- coveralls
- stage: Test
name: "Unit Tests for scikit-learn API"
install:
Expand Down
1 change: 1 addition & 0 deletions docker/lab/files/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ scikit-learn==0.22.1
tqdm==4.32.2
pymongo==3.8.0
pandas==1.0.3
numpy==1.19.5
cython==0.29.2
xgboost==0.82
simplejson==3.16.0
Expand Down
1 change: 1 addition & 0 deletions docker/machine/files/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ scikit-learn==0.22.1
tqdm==4.32.2
pymongo==3.8.0
pandas==1.0.3
numpy==1.19.5
matplotlib==3.1.0
mlxtend==0.16.0
pydot==1.4.1
Expand Down

0 comments on commit de77364

Please sign in to comment.