-
Notifications
You must be signed in to change notification settings - Fork 3.9k
41 lines (33 loc) · 1.13 KB
/
check_dependencies.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
41
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
python -m pip install git+https://github.com/openedx/[email protected]#egg=edx-repo-tools[find_dependencies]
- name: Run dependency check
run: |
python https://github.com/openedx/repo-tools/blob/master/edx_repo_tools/find_dependencies/find_dependencies.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