-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (102 loc) · 2.72 KB
/
test_ubuntu_python.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
name: Ubuntu Unittests
on: [push, pull_request]
env:
KIVY_SPLIT_EXAMPLES: 1
jobs:
PEP8_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Validate PEP8
run: |
source .ci/ubuntu_ci.sh
validate_pep8
unit_test:
runs-on: ubuntu-latest
env:
DISPLAY: ':99.0'
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install dependencies
run: |
source .ci/ubuntu_ci.sh
install_ubuntu_build_deps
./tools/build_linux_dependencies.sh
install_kivy_test_run_pip_deps
- name: Setup env
run: |
source .ci/ubuntu_ci.sh
prepare_env_for_unittest
- name: Install Kivy
run: |
source .ci/ubuntu_ci.sh
export KIVY_DEPS_ROOT=$(pwd)/kivy-dependencies
install_kivy
- name: Test Kivy
run: |
source .ci/ubuntu_ci.sh
test_kivy
- name: Coveralls upload
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
source .ci/ubuntu_ci.sh
upload_coveralls
- name: Test Kivy benchmarks
run: |
source .ci/ubuntu_ci.sh
test_kivy_benchmark
- name: Upload benchmarks as artifact
uses: actions/upload-artifact@v3
with:
name: benchmarks
path: .benchmarks-kivy
gen_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install dependencies
run: |
source .ci/ubuntu_ci.sh
install_ubuntu_build_deps
./tools/build_linux_dependencies.sh
install_kivy_test_run_pip_deps
- name: Setup env
run: |
source .ci/ubuntu_ci.sh
prepare_env_for_unittest
- name: Install Kivy
run: |
source .ci/ubuntu_ci.sh
install_kivy
- name: Generate docs
run: |
source .ci/ubuntu_ci.sh
generate_docs
- name: Upload docs as artifact
uses: actions/upload-artifact@v3
with:
name: docs
path: doc/build/html
- name: Upload docs to kivy-website-docs
if: github.event_name == 'push'
env:
REF_NAME: ${{ github.ref }}
DOC_PUSH_TOKEN: ${{ secrets.DOC_PUSH_TOKEN }}
run: |
branch_name=$(python3 -c "print('$REF_NAME'.split('/')[-1])")
source .ci/ubuntu_ci.sh
upload_docs_to_server "$branch_name" "$GITHUB_SHA"