-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (57 loc) · 1.73 KB
/
build-and-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Build and test
on:
push:
branches: [ "main", "dev"]
pull_request:
branches: [ "main", "dev"]
jobs:
build-and-test-default:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt update -y
sudo apt install -y build-essential libxml2 libxml2-dev zlib1g-dev python3-tk graphviz
python -m pip install pip==20.0.2
python -m pip install .[default]
- name: Test
run: python -m pytest tests/test.py
build-and-test-rcd:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.8"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt update -y
sudo apt install -y build-essential libxml2 libxml2-dev zlib1g-dev python3-tk graphviz
python -m venv env-rcd
. env-rcd/bin/activate
python -m pip install pip==20.0.2
python -m pip install wheel pytest
python -m pip install .[rcd]
# install for ht
sudo apt install openjdk-11-jre-headless
git clone https://github.com/salesforce/PyRCA.git
cd PyRCA; pip install -e .; cd ..
bash script/link.sh
- name: Test
run: |
. env-rcd/bin/activate
python -m pytest tests/test_rcd.py