Skip to content

Commit

Permalink
Merge pull request #34 from that-recsys-lab/schwartzadev/add-ci-matrix
Browse files Browse the repository at this point in the history
feat(ci): run tests on windows and ubuntu
  • Loading branch information
schwartzadev committed Oct 21, 2020
2 parents a6fb98c + 9c17e9f commit ddb17f2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

[run]
relative_files = True
omit = librec_auto/test
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ jobs:
run: |
yapf librec_auto --recursive --diff
test:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Setup Python 3.8
Expand All @@ -44,6 +47,7 @@ jobs:
run: |
coverage run --source=librec_auto -m pytest librec_auto/test/
- name: Coveralls
if: runner.os != 'Windows'
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: false
Expand Down
Binary file modified librec_auto/jar/auto.jar
Binary file not shown.
12 changes: 9 additions & 3 deletions librec_auto/test/core/util/test_files.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import os
import inspect
import librec_auto
from sys import platform
from pathlib import Path

import librec_auto
from librec_auto.core.util import Files, ExpPaths


Expand Down Expand Up @@ -33,8 +34,13 @@ def test_get_librec_paths():
assert files.get_jar_path() == Path(
'/demo/path/to/librec_auto/librec_auto/jar')

assert files.get_classpath(
) == '/demo/path/to/librec_auto/librec_auto/jar/auto.jar'
if platform == "win32":
# for windows
assert files.get_classpath(
) == 'D:/demo/path/to/librec_auto/librec_auto/jar/auto.jar', "Windows path is correct"
else:
assert files.get_classpath(
) == '/demo/path/to/librec_auto/librec_auto/jar/auto.jar', "Unix path is correct"


def test_get_study_paths():
Expand Down

0 comments on commit ddb17f2

Please sign in to comment.