-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (52 loc) · 1.82 KB
/
Copy pathpython-app.yml
File metadata and controls
57 lines (52 loc) · 1.82 KB
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python Tests
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
sudo apt-get install libegl1-mesa
sudo apt-get install xclip
sudo apt-get install gdb
pip install coverage
sudo apt-get install libxkbcommon-x11-0
sudo apt-get install libxcb-icccm4
sudo apt-get install libxcb-image0
pip install coverage-badge
sudo apt-get install xvfb x11-utils libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 xdotool
export LD_LIBRARY_PATH=/usr/lib
- name: Run tests
env:
QT_DEBUG_PLUGINS: 1
run: |
xvfb-run --auto-servernum coverage run --source=pypgpeed -m unittest discover -s tests
rm tests/coverage.txt
coverage report -m > tests/coverage.txt
rm assets/coverage.svg
coverage-badge -o assets/coverage.svg
ls assets/
ls tests/
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
author_name: Lewis
author_email: lewis.morris@gmail.com
message: "Update coverage"
add: |
"tests/coverage.txt"
"assets/coverage.svg"