Skip to content

Commit 7c10147

Browse files
committed
Came new
1 parent 7ad57ca commit 7c10147

File tree

2 files changed

+97
-0
lines changed

2 files changed

+97
-0
lines changed

.github/workflows/python-ci.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Python CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.9'
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install colored fontstyle httpx yt-dlp
25+
26+
- name: Check syntax of ytconverter.py
27+
run: python -m py_compile standalone/ytconverter.py
28+
29+
test-on-windows:
30+
runs-on: windows-latest
31+
needs: build
32+
steps:
33+
- name: Checkout repository
34+
uses: actions/checkout@v4
35+
36+
- name: Set up Python
37+
uses: actions/setup-python@v5
38+
with:
39+
python-version: '3.9'
40+
41+
- name: Install dependencies
42+
shell: bash
43+
run: |
44+
python -m pip install --upgrade pip
45+
pip install colored fontstyle httpx yt-dlp
46+
47+
- name: Create dummy data.json
48+
shell: bash
49+
run: |
50+
echo "{\"Name\": \"CI User\", \"Num\": \"ci@example.com\"}" > data.json
51+
52+
- name: Install ffmpeg (Windows)
53+
shell: pwsh
54+
run: |
55+
choco install ffmpeg -y
56+
57+
- name: Check for ffmpeg (Windows)
58+
shell: pwsh
59+
run: |
60+
ffmpeg -version
61+
62+
- name: Test Single MP3 Download
63+
shell: bash
64+
run: |
65+
echo "Starting Single MP3 Download Test"
66+
printf "n\nn\nn\n1\nhttp://www.youtube.com/watch?v=dQw4w9WgXcQ\n0\n\n" | python3 standalone/ytconverter.py
67+
echo "Single MP3 Download Test Finished"
68+
69+
- name: Test Single MP4 Download
70+
shell: bash
71+
run: |
72+
echo "Starting Single MP4 Download Test"
73+
printf "\n2\nhttp://www.youtube.com/watch?v=dQw4w9WgXcQ\n1\n\n" | python3 standalone/ytconverter.py
74+
echo "Single MP4 Download Test Finished"
75+
76+
- name: Test Multiple MP4 Download
77+
shell: bash
78+
run: |
79+
echo "Starting Multiple MP4 Download Test"
80+
printf "n\nn\nn\n3\nhttp://www.youtube.com/watch?v=dQw4w9WgXcQ\n0\n1\n\n" | python3 standalone/ytconverter.py
81+
echo "Multiple MP4 Download Test Finished"
82+
83+
- name: Test Exit Option
84+
shell: bash
85+
run: |
86+
echo "Starting Exit Option Test"
87+
printf "n\nn\nn\n4\n" | python3 standalone/ytconverter.py
88+
echo "Exit Option Test Finished"
89+

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.env
2+
data.json
3+
error_logs.txt
4+
rm_cache.py
5+
*.txt
6+
__pycache__
7+
auto.sh
8+

0 commit comments

Comments
 (0)