-
Notifications
You must be signed in to change notification settings - Fork 4
69 lines (58 loc) · 2.15 KB
/
unittests.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
on: [push, pull_request]
env:
XDG_RUNTIME_DIR: "/tmp/github-workflows"
jobs:
test_clipboard:
name: test clipboard functionality
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
include:
- os: ubuntu-latest
display_server: xorg
xorg_display: :99
- os: ubuntu-latest
display_server: wayland
wayland_display: wayland-0
steps:
- name: checkout
uses: actions/checkout@v2
- name: install-ubuntu-xorg
if: ${{ matrix.os == 'ubuntu-latest' && matrix.display_server == 'xorg' }}
run: sudo apt update && sudo apt install -y xvfb xclip
- name: install-ubuntu-wayland
if: ${{ matrix.os == 'ubuntu-latest' && matrix.display_server == 'wayland' }}
run: |
sudo apt update
sudo apt install -y --no-install-recommends --no-install-suggests kwin-wayland kwin-wayland-backend-virtual wl-clipboard
- name: setup python
uses: actions/setup-python@v2
with:
python-version: '3.8'
architecture: 'x64'
- name: install
run: python -m pip install --upgrade . && python -m pip install pytest coverage coveralls && pip install .
- name: start xvfb
if: ${{ matrix.os == 'ubuntu-latest' && matrix.display_server == 'xorg' }}
run: |
sudo Xvfb ${{ matrix.xorg_display }} -screen 0 640x480x8 -nolisten tcp &
- name: start kwin_wayland
if: ${{ matrix.os == 'ubuntu-latest' && matrix.display_server == 'wayland' }}
run: |
mkdir -p $XDG_RUNTIME_DIR
kwin_wayland --virtual &
- name: run tests
env: # Or as an environment variable
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: "true"
DISPLAY: ${{ matrix.xorg_display }}
WAYLAND_DISPLAY: ${{ matrix.wayland_display }}
run: coverage run -m pytest -vv
- name: Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install --upgrade coveralls
coveralls --service=github