Skip to content

Commit d0ff615

Browse files
committed
add circleci config
1 parent 21fb486 commit d0ff615

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

.circleci/config.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
version: 2.1
2+
3+
executors:
4+
python-executor:
5+
docker:
6+
- image: circleci/python:3.9
7+
working_directory: ~/repo
8+
9+
jobs:
10+
setup-and-run-tests:
11+
executor: python-executor
12+
steps:
13+
# Step 1: Checkout medLLM repo
14+
- checkout
15+
16+
# Step 2: Install dependencies for medLLM
17+
- run:
18+
name: Install Dependencies for medLLM
19+
command: |
20+
python -m venv venv
21+
. venv/bin/activate
22+
pip install -r requirements.txt
23+
24+
# Step 3: Run medLLM build/test commands
25+
- run:
26+
name: Build and Test medLLM
27+
command: |
28+
. venv/bin/activate
29+
# Replace this with the actual command(s) to build/test medLLM
30+
python -m unittest discover -s tests
31+
32+
# Step 4: Clone BreakYourLLM repository
33+
- run:
34+
name: Clone BreakYourLLM Repository
35+
command: |
36+
git clone https://[email protected]/ModelPulse/BreakYourLLM.git
37+
cd BreakYourLLM
38+
python -m venv venv
39+
. venv/bin/activate
40+
pip install -r requirements.txt
41+
42+
# Step 5: Replace configurations in BreakYourLLM
43+
- run:
44+
name: Replace Configurations
45+
command: |
46+
cp medLLM/config/user_config1.json BreakYourLLM/config/config1.json
47+
cp medLLM/config/user_config2.json BreakYourLLM/config/config2.json
48+
49+
# Step 6: Run main.py in BreakYourLLM
50+
- run:
51+
name: Run main.py in BreakYourLLM
52+
command: |
53+
cd BreakYourLLM
54+
. venv/bin/activate
55+
python main.py
56+
57+
# Step 7: Check Results
58+
- run:
59+
name: Check Results
60+
command: |
61+
if grep -q '"status": "pass"' BreakYourLLM/results/stage5_metric_evaluation.json; then
62+
echo "Build Passed"
63+
else
64+
echo "Build Failed"
65+
exit 1
66+
fi
67+
68+
workflows:
69+
version: 2
70+
build-and-test:
71+
jobs:
72+
- setup-and-run-tests

0 commit comments

Comments
 (0)