forked from streamlink/streamlink
-
Notifications
You must be signed in to change notification settings - Fork 0
138 lines (134 loc) · 4.42 KB
/
test.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
name: Test
on:
push:
branches-ignore:
- "automated/**"
tags-ignore:
- "**"
pull_request: {}
schedule:
- cron: "0 0 * * *"
jobs:
test:
name: Test
strategy:
fail-fast: false
# please remember to change the `codecov.notify.after_n_builds` value in .codecov.yml
# when changing the build matrix and changing the number of test runners
matrix:
runs-on:
- ubuntu-latest
- windows-latest
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
# include:
# - runs-on: ubuntu-latest
# python-version: "3.14-dev"
# continue: true
# - runs-on: windows-latest
# python-version: "3.14-dev"
# continue: true
runs-on: ${{ matrix.runs-on }}
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 300
- name: Fetch tags
shell: bash
run: |
git ls-remote --tags --sort=version:refname 2>&- \
| awk 'END{printf "+%s:%s\n",$2,$2}' \
| git fetch origin --depth=300 \
|| { ec=$?; [ $ec -eq 141 ] && true || (exit $ec); }
git fetch origin --depth=300 --update-shallow
git describe --tags --long --dirty
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: >
python -m pip install -U
-e .
-r dev-requirements.txt
continue-on-error: ${{ matrix.continue || false }}
- name: Install optional Python dependencies
run: >
python -m pip install -U
brotli
- name: Test
continue-on-error: ${{ matrix.continue || false }}
run: pytest -r a --cov --cov-branch --cov-report=xml --durations 10
- name: Upload coverage data
if: github.event_name != 'schedule'
continue-on-error: ${{ matrix.continue || false }}
uses: codecov/codecov-action@v4
with:
name: os:${{ matrix.runs-on }} py:${{ matrix.python-version }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
test_build:
name: Test build
if: github.event_name != 'push'
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 300
- name: Fetch tags
run: |
git ls-remote --tags --sort=version:refname 2>&- | awk 'END{printf "+%s:%s\n",$2,$2}' | git fetch origin --depth=300
git fetch origin --depth=300 --update-shallow
git describe --tags --long --dirty
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Python dependencies
run: >
python -m pip install -U
-e .
-r dev-requirements.txt
build
wheel
shtab
- name: Build shell completions
continue-on-error: ${{ matrix.continue || false }}
run: bash ./script/build-shell-completions.sh
- name: Build sdist and wheels
run: ./script/build-and-sign.sh
- name: Plugins JSON
run: |
set -x
unzip -p ./dist/streamlink-*-any.whl 'streamlink-*.dist-info/RECORD' | grep 'streamlink/plugins/_plugins.json'
unzip -p ./dist/streamlink-*-any.whl 'streamlink/plugins/_plugins.json' | grep -E '^\s*//'
unzip -p ./dist/streamlink-*-any.whl 'streamlink/plugins/_plugins.json' | grep -vE '^\s*//' | jq -e 'keys > 0'
unzip -p ./dist/streamlink-*-any.whl 'streamlink/plugins/_plugins.json' | grep -vE '^\s*//' | jq
documentation:
name: Test docs
if: github.event_name != 'push'
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 300
- name: Fetch tags
run: |
git ls-remote --tags --sort=version:refname 2>&- | awk 'END{printf "+%s:%s\n",$2,$2}' | git fetch origin --depth=300
git fetch origin --depth=300 --update-shallow
git describe --tags --long --dirty
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Python dependencies
run: >
python -m pip install -U
-e .
-r docs-requirements.txt
- name: Build
run: make --directory=docs html man