-
Notifications
You must be signed in to change notification settings - Fork 30
79 lines (69 loc) · 2.51 KB
/
tests.yml
File metadata and controls
79 lines (69 loc) · 2.51 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Tests (Python 3.x)
on:
push:
paths:
- '.github/workflows/**'
- 'src/**'
- 'tests/**'
- 'setup.py'
pull_request:
paths:
- '.github/workflows/**'
- 'src/**'
- 'tests/**'
- 'setup.py'
jobs:
test_using_builtin_python:
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest', 'windows-latest' ]
python-version: [ '3.6', '3.7', '3.8' ]
include:
- os: ubuntu-latest
set_display: export DISPLAY=:99; Xvfb :99 -screen 0 1024x768x24 -ac -noreset & sleep 3
#- os: macos-latest
#set_tmpdir: export TMPDIR=/tmp
- os: windows-latest
set_codepage: chcp 850
runs-on: ${{ matrix.os }}
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup python ${{ matrix.python-version }} for running the tests
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
# pyautogui does not work by default (https://github.com/asweigart/pyautogui/issues/247)
# need to disable security feature (https://apple.stackexchange.com/questions/178313/change-accessibility-setting-on-mac-using-terminal)
# and database is readonly (https://github.com/jacobsalmela/tccutil/issues/18)
# you need to disable SIP, but for that go into recovery mode and disable it - not on CI system
#- name: Install test tools to Mac
#run: |
#sudo sqlite3 "/Library/Application Support/com.apple.TCC/TCC.db" 'UPDATE access SET allowed = "1";'
#if: runner.os == 'macOS'
- name: Install test tools to Linux
run: |
sudo apt-get update
sudo apt-get -y -q install xvfb scrot
touch ~/.Xauthority
if: contains(matrix.os, 'ubuntu')
- name: Install python test dependencies
run: |
python --version
python -m pip install mock robotframework opencv-python scikit-image eel .
- name: Run tests
run: |
${{ matrix.set_codepage }}
${{ matrix.set_display }}
python tests/utest/run_tests.py
python tests/atest/run_tests.py
- name: Archive acceptances test results
uses: actions/upload-artifact@v2.3.0
with:
name: output-${{ matrix.python-version }}-${{ matrix.os }}
path: |
log.html
./*.png
if: always() && job.status == 'failure'