Skip to content

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

chore: add workflow to find the python dependencies in repo

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

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 git+https://github.com/openedx/[email protected][find_dependencies]
- name: Run dependency check
run: |
python 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