Skip to content

Commit 6eab97f

Browse files
Update ci_cd.yml
1 parent ef81d5a commit 6eab97f

File tree

1 file changed

+15
-21
lines changed

1 file changed

+15
-21
lines changed

.github/workflows/ci_cd.yml

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
name: CI Workflow
1+
name: CI/CD Workflow
22

33
on:
44
push:
55
branches:
66
- master
77

8-
pull_request:
9-
branches:
10-
- master
11-
128
jobs:
13-
test:
9+
build:
1410
runs-on: ubuntu-latest
1511

1612
steps:
@@ -20,21 +16,19 @@ jobs:
2016
- name: Set up Python
2117
uses: actions/setup-python@v4
2218
with:
23-
python-version: '3.12.7'
24-
25-
- name: Find and Install Dependencies
26-
run: |
27-
python -m pip install --upgrade pip
28-
# Find all requirements.txt files and install dependencies for each
29-
for req_file in $(find . -name "requirements.txt"); do
30-
echo "Installing dependencies from $req_file"
31-
pip install -r "$req_file"
32-
done
19+
python-version: '3.12.7'
3320

34-
- name: Run Tests
21+
- name: Install dependencies for each subproject
3522
run: |
36-
# Run tests in each subproject that contains tests
37-
for test_dir in $(find . -type d -name "tests"); do
38-
echo "Running tests in $test_dir"
39-
pytest "$test_dir"
23+
# Loop through each subproject directory
24+
for dir in projects/*; do
25+
if [ -d "$dir" ]; then
26+
echo "Installing dependencies for $dir"
27+
# Check if requirements.txt exists in the subproject
28+
if [ -f "$dir/requirements.txt" ]; then
29+
pip install -r "$dir/requirements.txt"
30+
else
31+
echo "No requirements.txt found in $dir"
32+
fi
33+
fi
4034
done

0 commit comments

Comments
 (0)