File tree Expand file tree Collapse file tree 1 file changed +15
-21
lines changed Expand file tree Collapse file tree 1 file changed +15
-21
lines changed Original file line number Diff line number Diff line change 1
- name : CI Workflow
1
+ name : CI/CD Workflow
2
2
3
3
on :
4
4
push :
5
5
branches :
6
6
- master
7
7
8
- pull_request :
9
- branches :
10
- - master
11
-
12
8
jobs :
13
- test :
9
+ build :
14
10
runs-on : ubuntu-latest
15
11
16
12
steps :
@@ -20,21 +16,19 @@ jobs:
20
16
- name : Set up Python
21
17
uses : actions/setup-python@v4
22
18
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'
33
20
34
- - name : Run Tests
21
+ - name : Install dependencies for each subproject
35
22
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
40
34
done
You can’t perform that action at this time.
0 commit comments