-
-
Notifications
You must be signed in to change notification settings - Fork 31
89 lines (73 loc) · 2.31 KB
/
python-ci.yml
File metadata and controls
89 lines (73 loc) · 2.31 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Python CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install colored fontstyle httpx yt-dlp
- name: Check syntax of ytconverter.py
run: python -m py_compile standalone/ytconverter.py
test-on-windows:
runs-on: windows-latest
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install colored fontstyle httpx yt-dlp
- name: Create dummy data.json
shell: bash
run: |
echo "{\"Name\": \"CI User\", \"Num\": \"ci@example.com\"}" > data.json
- name: Install ffmpeg (Windows)
shell: pwsh
run: |
choco install ffmpeg -y
- name: Check for ffmpeg (Windows)
shell: pwsh
run: |
ffmpeg -version
- name: Test Single MP3 Download
shell: bash
run: |
echo "Starting Single MP3 Download Test"
printf "n\nn\nn\n1\nhttp://www.youtube.com/watch?v=dQw4w9WgXcQ\n0\n\n" | python3 standalone/ytconverter.py
echo "Single MP3 Download Test Finished"
- name: Test Single MP4 Download
shell: bash
run: |
echo "Starting Single MP4 Download Test"
printf "\n2\nhttp://www.youtube.com/watch?v=dQw4w9WgXcQ\n1\n\n" | python3 standalone/ytconverter.py
echo "Single MP4 Download Test Finished"
- name: Test Multiple MP4 Download
shell: bash
run: |
echo "Starting Multiple MP4 Download Test"
printf "n\nn\nn\n3\nhttp://www.youtube.com/watch?v=dQw4w9WgXcQ\n0\n1\n\n" | python3 standalone/ytconverter.py
echo "Multiple MP4 Download Test Finished"
- name: Test Exit Option
shell: bash
run: |
echo "Starting Exit Option Test"
printf "n\nn\nn\n4\n" | python3 standalone/ytconverter.py
echo "Exit Option Test Finished"