-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (33 loc) · 961 Bytes
/
ci_cd.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
name: CI Workflow
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12.7'
- name: Find and Install Dependencies
run: |
python -m pip install --upgrade pip
# Find all requirements.txt files and install dependencies for each
for req_file in $(find . -name "requirements.txt"); do
echo "Installing dependencies from $req_file"
pip install -r "$req_file"
done
- name: Run Tests
run: |
# Run tests in each subproject that contains tests
for test_dir in $(find . -type d -name "tests"); do
echo "Running tests in $test_dir"
pytest "$test_dir"
done