-
Notifications
You must be signed in to change notification settings - Fork 90
78 lines (71 loc) · 2.24 KB
/
pr.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
name: Pull request check
on:
pull_request:
types: [opened, synchronize, reopened]
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: Run flake8
uses: py-actions/flake8@v2
with:
max-line-length: "100"
# 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==0.0.16
# - name: Run kodi-addon-checker
# run: kodi-addon-checker --branch krypton --allow-folder-id-mismatch ./plugin.video.catchuptvandmore
# Branch check
branch:
name: Base branch check
runs-on: ubuntu-latest
if: github.base_ref != 'dev'
steps:
- name: Branch dev check
run: |
echo "Pull request need to be done on dev branch and not on ${{ github.base_ref }}"
exit 1