Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Closed
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
1e02193
chore: add workflow to find the python dependencies in repo
salman2013 Mar 26, 2024
89496f6
chore: add workflow to find the python dependencies in repo
salman2013 Mar 26, 2024
00f5a1c
chore: add workflow to find the python dependencies in repo
salman2013 Mar 26, 2024
6ac3575
chore: add workflow to find the python dependencies in repo
salman2013 Mar 26, 2024
20f8fe9
chore: add workflow to find the python dependencies in repo
salman2013 Mar 26, 2024
275f4d1
chore: add workflow to find the python dependencies in repo
salman2013 Mar 26, 2024
6e23973
chore: add workflow to find the python dependencies in repo
salman2013 Mar 27, 2024
f346caf
chore: add workflow to find the python dependencies in repo
salman2013 Mar 27, 2024
0c12e6b
chore: add workflow to find the python dependencies in repo
salman2013 Mar 27, 2024
f1b9f58
chore: add workflow to find the python dependencies in repo
salman2013 Mar 27, 2024
ce1ea33
chore: add workflow to find the python dependencies in repo
salman2013 Mar 27, 2024
6ee9238
chore: add workflow to find the python dependencies in repo
salman2013 Mar 27, 2024
5e7ac1e
chore: add workflow to find the python dependencies in repo
salman2013 Mar 27, 2024
f58fff8
chore: add workflow to find the python dependencies in repo
salman2013 Mar 27, 2024
65b3ef1
chore: add workflow to find the python dependencies in repo
salman2013 Mar 27, 2024
8bc08e1
chore: add workflow to find the python dependencies in repo
salman2013 Mar 27, 2024
ab272db
chore: add workflow to find the python dependencies in repo
salman2013 Mar 27, 2024
24c466a
chore: add workflow to find the python dependencies in repo
salman2013 Mar 28, 2024
963d0a0
chore: add workflow to find the python dependencies in repo
salman2013 Mar 28, 2024
02730f1
chore: add workflow to find the python dependencies in repo
salman2013 Mar 28, 2024
da22d2c
chore: add workflow to find the python dependencies in repo
salman2013 Mar 28, 2024
3bd672f
chore: add workflow to find the python dependencies in repo
salman2013 Mar 28, 2024
438a119
chore: add workflow to find the python dependencies in repo
salman2013 Mar 28, 2024
81f18b4
chore: add workflow to find the python dependencies in repo
salman2013 Mar 28, 2024
8396c71
chore: add workflow to find the python dependencies in repo
salman2013 Mar 28, 2024
0d1fa1b
chore: testing ci check
salman2013 Apr 3, 2024
7a6f0b9
chore: testing ci check
salman2013 Apr 3, 2024
e84e364
chore: testing ci check
salman2013 Apr 3, 2024
437f099
chore: testing ci check
salman2013 Apr 3, 2024
ebc7c44
chore: testing ci check
salman2013 Apr 3, 2024
a507eec
chore: testing ci check
salman2013 Apr 3, 2024
8ea5db5
chore: testing ci check
salman2013 Apr 3, 2024
beb443a
chore: testing ci check
salman2013 Apr 3, 2024
ed9a1a6
chore: testing ci check
salman2013 Apr 3, 2024
dd33233
chore: testing ci check
salman2013 Apr 3, 2024
ba08913
chore: testing ci check
salman2013 Apr 3, 2024
0e71e82
chore: testing ci check
salman2013 Apr 3, 2024
2fdfb23
chore: testing ci check
salman2013 Apr 3, 2024
109d347
chore: testing ci check
salman2013 Apr 3, 2024
4df4d0c
chore: testing ci check
salman2013 Apr 3, 2024
ef7dedb
chore: testing ci check
salman2013 Apr 3, 2024
7c99e20
chore: testing ci check
salman2013 Apr 4, 2024
2a8dbd5
chore: testing ci check
salman2013 Apr 4, 2024
020f01c
chore: testing ci check
salman2013 Apr 4, 2024
41af1c8
chore: testing ci check
salman2013 Apr 4, 2024
eb0ba0f
chore: testing ci check
salman2013 Apr 4, 2024
7524e4c
chore: testing ci check
salman2013 Apr 4, 2024
651ec17
chore: testing ci check
salman2013 Apr 4, 2024
7c64b86
chore: testing ci check
salman2013 Apr 4, 2024
639c8f5
chore: testing ci check
salman2013 Apr 4, 2024
2d81877
chore: testing ci check
salman2013 Apr 4, 2024
2d5676b
chore: testing ci check
salman2013 Apr 4, 2024
bfe1660
chore: testing ci check
salman2013 Apr 4, 2024
57d694d
chore: testing ci check
salman2013 Apr 4, 2024
6081c77
chore: testing ci check
salman2013 Apr 4, 2024
be3cb60
chore: testing ci check
salman2013 Apr 4, 2024
cbfc2ba
chore: testing ci check
salman2013 Apr 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions .github/workflows/check_dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Check Python Dependencies

on:
pull_request:

defaults:
run:
shell: bash # strict bash

jobs:
check_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: Create repo_work directory
run: |
WORK_DIR="/tmp/unpack_reqs"
repo_name="${{ github.repository }}"
repo_work="$WORK_DIR/$repo_name"
mkdir -p "$repo_work"
echo "$repo_work"

- name: Copy Python requirements file
run: |
for req_file in "requirements/edx/base.txt" "requirements/base.txt" "requirements.txt"; do
if [ -f "$req_file" ]; then
cp "$req_file" /tmp/unpack_reqs/openedx/edx-platform/base.txt
echo "Python requirements file found: $req_file"
echo "Content of base.txt:"
cat "$req_file"
break
fi
done

- name: Create virtual environment
run: python3 -m venv .venv
working-directory: /tmp/unpack_reqs/openedx/edx-platform

- name: Upgrade pip
run: |
.venv/bin/python3 -m pip install -U pip
working-directory: /tmp/unpack_reqs/openedx/edx-platform

- name: Download packages
run: |
echo "Downloading packages"
.venv/bin/python3 -m pip download --dest files -r base.txt
working-directory: /tmp/unpack_reqs/openedx/edx-platform

- name: Extract GitHub URLs from base.txt
id: extract
run: |
urls=()
base_txt_path="/tmp/unpack_reqs/openedx/edx-platform/base.txt"
while IFS= read -r line; do
if [[ $line =~ (https://github.com[^@ #]*(\.git)?) ]]; then
urls+=("${BASH_REMATCH[0]}")
fi
done < "${base_txt_path}"
echo "{name}={urls}" >> $GITHUB_OUTPUT

- name: Display GitHub URLs
run: |
echo "GitHub URLs:"
echo "${{ steps.extract.outputs.urls }}"

- name: Check if files directory exists
run: |
if [ -d "/tmp/unpack_reqs/openedx/edx-platform/files" ]; then
echo "Directory exists: /tmp/unpack_reqs/openedx/edx-platform/files"
else
echo "Directory does not exist: /tmp/unpack_reqs/openedx/edx-platform/files"
exit 1
fi

- name: Print WHL Files
run: |
echo "Path of files: /tmp/unpack_reqs/openedx/edx-platform/files"
echo "WHL files found:"
for file in /tmp/unpack_reqs/openedx/edx-platform/files/*.whl; do
echo "File: $file"
echo "Contents:"
cat "$file"
echo "-----------------"
done
Loading