Skip to content

Commit

Permalink
Merge pull request #11 from salesforce/revise_setup
Browse files Browse the repository at this point in the history
Update testing pipeline
  • Loading branch information
yangwenz committed Apr 13, 2023
2 parents 9dcf134 + 33f328b commit 23e55c2
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
tests:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
sudo apt-get update -y
python -m pip install --upgrade pip setuptools wheel build
python -m pip install pytest
python -m build
for f in dist/*.whl; do pip install $f[all]; done
- name: Test with pytest
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
python3 -m pytest ./tests
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# PyRCA: A Python library for Root Cause Analysis
<div align="center">
<a href="#">
<img src="https://img.shields.io/badge/Python-3.7, 3.8, 3.9, 3.10-blue">
<img src="https://img.shields.io/badge/Python-3.7, 3.8, 3.9-blue">
</a>
<a href="https://opensource.salesforce.com/PyRCA">
<img alt="Documentation" src="https://github.com/salesforce/PyRCA/actions/workflows/docs.yml/badge.svg"/>
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"numpy>=1.17",
"pandas>=1.1.0",
"scikit-learn>=0.24,<1.2",
"networkx>=2.8",
"networkx>=2.6",
"matplotlib",
"pyyaml",
"schema",
Expand Down
2 changes: 2 additions & 0 deletions tests/analyzers/test_psi_pc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import pytest
import unittest
import pandas as pd
import pickle as pkl
Expand All @@ -7,6 +8,7 @@

class TestEplisonDiagnosis(unittest.TestCase):

@pytest.mark.skip(reason="pickle issue")
def test(self):
# SRC_DIR = '../data/n-10-d-3-an-1-nor-s-1000-an-s-1000/'
# normal = SRC_DIR + 'normal.csv'
Expand Down
2 changes: 2 additions & 0 deletions tests/analyzers/test_rht.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import pytest
import unittest
import pandas as pd
import pickle as pkl
Expand All @@ -8,6 +9,7 @@

class TestRHT(unittest.TestCase):

@pytest.mark.skip(reason="pickle issue")
def test(self):
directory = os.path.dirname(os.path.abspath(__file__))
with open(os.path.join(directory, "../data/estimated_dag.pkl"), "rb") as f:
Expand Down

0 comments on commit 23e55c2

Please sign in to comment.