1- name : ytld-sub CI
1+ name : ytld-sub CI (Linux)
22
33on :
44 pull_request :
88 branches :
99 - master
1010jobs :
11- test-build :
12- runs-on : ubuntu-22.04
13- strategy :
14- matrix :
15- python-version : ["3.10"]
16- steps :
17- - uses : actions/checkout@v3
18-
19- - name : Set up Python ${{ matrix.python-version }}
20- uses : actions/setup-python@v4
21- with :
22- python-version : ${{ matrix.python-version }}
23-
24- - name : Install dependencies
25- run : |
26- python -m venv /opt/env
27- source /opt/env/bin/activate
28- pip install -e .[lint,test]
29- - name : Save Python build cache
30- uses : actions/cache@v3
31- with :
32- path : /opt/env
33- key : ${{github.sha}}-env
34-
3511 test-lint :
3612 runs-on : ubuntu-22.04
37- needs : test-build
3813 permissions :
3914 contents : read
4015
4116 steps :
4217 - uses : actions/checkout@v3
4318
44- - name : Restore Python build cache
45- uses : actions/cache@v3
19+ - name : Set up Python
20+ uses : actions/setup-python@v4
4621 with :
47- path : /opt/env
48- key : ${{github.sha}}-env
22+ python-version : " 3.10"
4923
5024 - name : Run linters
5125 run : |
52- source /opt/env/bin/activate
26+ pip install -e .[lint]
5327 make check_lint
5428
5529 test-unit :
5630 runs-on : ubuntu-22.04
57- needs : test-build
5831 permissions :
5932 contents : read
6033
6134 steps :
6235 - uses : actions/checkout@v3
6336
64- - name : Restore Python build cache
65- uses : actions/cache@v3
37+ - name : Set up Python
38+ uses : actions/setup-python@v4
6639 with :
67- path : /opt/env
68- key : ${{github.sha}}-env
40+ python-version : " 3.10"
6941
7042 - name : Run unit tests with coverage
7143 run : |
44+ pip install -e .[test]
7245 sudo apt-get update
7346 sudo apt-get install -y ffmpeg
74- source /opt/env/bin/activate
7547 coverage run -m pytest tests/unit && coverage xml -o /opt/coverage/unit/coverage.xml
7648
7749 - name : Save coverage
@@ -82,46 +54,42 @@ jobs:
8254
8355 test-soundcloud :
8456 runs-on : ubuntu-22.04
85- needs : test-build
8657 permissions :
8758 contents : read
8859
8960 steps :
9061 - uses : actions/checkout@v3
9162
92- - name : Restore Python build cache
93- uses : actions/cache@v3
63+ - name : Set up Python
64+ uses : actions/setup-python@v4
9465 with :
95- path : /opt/env
96- key : ${{github.sha}}-env
66+ python-version : " 3.10"
9767
9868 - name : Run e2e soundcloud tests with coverage
9969 run : |
70+ pip install -e .[test]
10071 sudo apt-get update
10172 sudo apt-get install -y ffmpeg
102- source /opt/env/bin/activate
10373 coverage run -m pytest tests/e2e/soundcloud && coverage xml -o /opt/coverage/soundcloud/coverage.xml
10474
10575 test-bandcamp :
10676 runs-on : ubuntu-22.04
107- needs : test-build
10877 permissions :
10978 contents : read
11079
11180 steps :
11281 - uses : actions/checkout@v3
11382
114- - name : Restore Python build cache
115- uses : actions/cache@v3
83+ - name : Set up Python
84+ uses : actions/setup-python@v4
11685 with :
117- path : /opt/env
118- key : ${{github.sha}}-env
86+ python-version : " 3.10"
11987
12088 - name : Run e2e soundcloud tests with coverage
12189 run : |
90+ pip install -e .[test]
12291 sudo apt-get update
12392 sudo apt-get install -y ffmpeg
124- source /opt/env/bin/activate
12593 coverage run -m pytest tests/e2e/bandcamp && coverage xml -o /opt/coverage/bandcamp/coverage.xml
12694
12795 - name : Save coverage
@@ -132,24 +100,22 @@ jobs:
132100
133101 test-youtube :
134102 runs-on : ubuntu-22.04
135- needs : test-build
136103 permissions :
137104 contents : read
138105
139106 steps :
140107 - uses : actions/checkout@v3
141108
142- - name : Restore Python build cache
143- uses : actions/cache@v3
109+ - name : Set up Python
110+ uses : actions/setup-python@v4
144111 with :
145- path : /opt/env
146- key : ${{github.sha}}-env
112+ python-version : " 3.10"
147113
148114 - name : Run e2e youtube tests with coverage
149115 run : |
116+ pip install -e .[test]
150117 sudo apt-get update
151118 sudo apt-get install -y ffmpeg
152- source /opt/env/bin/activate
153119 coverage run -m pytest tests/e2e/youtube && coverage xml -o /opt/coverage/youtube/coverage.xml
154120
155121 - name : Save coverage
@@ -160,24 +126,22 @@ jobs:
160126
161127 test-plugins :
162128 runs-on : ubuntu-22.04
163- needs : test-build
164129 permissions :
165130 contents : read
166131
167132 steps :
168133 - uses : actions/checkout@v3
169134
170- - name : Restore Python build cache
171- uses : actions/cache@v3
135+ - name : Set up Python
136+ uses : actions/setup-python@v4
172137 with :
173- path : /opt/env
174- key : ${{github.sha}}-env
138+ python-version : " 3.10"
175139
176140 - name : Run e2e plugin tests with coverage
177141 run : |
142+ pip install -e .[test]
178143 sudo apt-get update
179144 sudo apt-get install -y ffmpeg
180- source /opt/env/bin/activate
181145 coverage run -m pytest tests/e2e/plugins && coverage xml -o /opt/coverage/plugins/coverage.xml
182146
183147 - name : Save coverage
0 commit comments