Skip to content

Commit

Permalink
Merge pull request #3 from RUCAIBox/0.2.x
Browse files Browse the repository at this point in the history
Merge 0.2.x
  • Loading branch information
chenyushuo authored Nov 12, 2020
2 parents 3b27989 + ddc8590 commit 8a182cd
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Python package

on:
- push
# - pull_request

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# Use "python -m pytest" instead of "pytest" to fix imports
- name: Test metrics
run: |
python -m pytest tests/metrics
- name: Test evaluation_setting
run: |
python -m pytest tests/evaluation_setting
2 changes: 1 addition & 1 deletion tests/metrics/test_loss_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def get_result(name, case=0):
getattr(TestCases, f'preds_{case}'))


class TestLossMetrics(unittest.TestCases):
class TestLossMetrics(unittest.TestCase):
def test_auc(self):
name = 'auc'
self.assertEqual(get_result(name, case=0), 0)
Expand Down

0 comments on commit 8a182cd

Please sign in to comment.