-
Notifications
You must be signed in to change notification settings - Fork 90
143 lines (135 loc) · 4.47 KB
/
ci.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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: CI
# Controls when the action will run.
on: push
jobs:
# Flake
flake:
name: Run flake8 linter
runs-on: ubuntu-latest
steps:
- name: Check out plugin repository
uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install flake8
run: pip install flake8
- name: Run flake8
uses: wearerequired/lint-action@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
flake8: true
# Test add-on python files
test-plugin-modules:
name: Load each Python files of the addon to detect errors
needs: flake
runs-on: ubuntu-latest
steps:
- name: Check out plugin repository
uses: actions/checkout@v4
with:
path: plugin.video.catchuptvandmore
- name: Check out simulator repository
uses: actions/checkout@v4
with:
path: simulator
repository: Catch-up-TV-and-More/catchuptvandmore-test
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
working-directory: simulator
run: pip install -r requirements.txt
- name: Start catchuptvandmore-test with test_modules config
working-directory: simulator
run: python main.py --test-modules -a ../plugin.video.catchuptvandmore
# Check the plugin with kodi-addon-checker
# kodi-addon-checker:
# name: Kodi-addon-checker
# needs: test-plugin-modules
# runs-on: ubuntu-latest
# steps:
# - name: Check out plugin repository
# uses: actions/checkout@v4
# - name: Set up Python 3.8
# uses: actions/setup-python@v5
# with:
# python-version: 3.8
# - name: Install kodi-addon-checker
# run: pip install kodi-addon-checker
# - name: Run kodi-addon-checker
# run: kodi-addon-checker --branch krypton --allow-folder-id-mismatch .
# Update repository.catchuptvandmore
update-repo:
name: Update repository.catchuptvandmore
needs: flake
runs-on: ubuntu-latest
steps:
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Check out repository.catchuptvandmore repository
uses: actions/checkout@v4
with:
repository: Catch-up-TV-and-More/repository.catchuptvandmore
token: ${{ secrets.GITHUB_ACTIONS_ACCESS_TOKEN }}
- name: Install dependencies
run: pip install -r requirements.txt
- name: Configure git
run: |
git config user.name 'GitHub Actions'
git config user.email '[email protected]'
- name: Update all repositories
run: ./update_all_repos.sh
# Test the plugin with our Kodi simulator
kodi-simulator-1:
name: "Explore random replay channel #1"
needs: update-repo
runs-on: ubuntu-latest
steps:
- name: Check out plugin repository
uses: actions/checkout@v4
with:
path: plugin.video.catchuptvandmore
- name: Check out simulator repository
uses: actions/checkout@v4
with:
path: simulator
repository: Catch-up-TV-and-More/catchuptvandmore-test
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
working-directory: simulator
run: pip install -r requirements.txt
- name: Start catchuptvandmore-test
working-directory: simulator
run: python main.py -c configs/5_explore_random_replay_channel_random_country.json
kodi-simulator-2:
name: "Explore random website"
needs: kodi-simulator-1
runs-on: ubuntu-latest
steps:
- name: Check out plugin repository
uses: actions/checkout@v4
with:
path: plugin.video.catchuptvandmore
- name: Check out simulator repository
uses: actions/checkout@v4
with:
path: simulator
repository: Catch-up-TV-and-More/catchuptvandmore-test
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
working-directory: simulator
run: pip install -r requirements.txt
- name: Start catchuptvandmore-test
working-directory: simulator
run: python main.py -c configs/6_explore_random_website.json