Skip to content

chore: add workflow to find the python dependencies in repo #11

chore: add workflow to find the python dependencies in repo

chore: add workflow to find the python dependencies in repo #11

name: Check Python Dependencies
on:
pull_request:
defaults:
run:
shell: bash # strict bash
jobs:
check_dependencies:
name: Check Python Dependencies
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.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install edx-repo-tools[find_dependencies]
- name: Run dependency check
run: |
python /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/finding_dependency.py
- name: Check if any dependency belongs to openedx
run: |
if grep -q openedx /tmp/unpack_reqs/repo_urls.txt; then
echo "A dependency belongs to openedx organization"
exit 0 # Pass the check
else
echo "No dependency belongs to openedx organization"
exit 1 # Fail the check
fi