forked from robotframework/robotframework
-
Notifications
You must be signed in to change notification settings - Fork 0
129 lines (106 loc) · 3.6 KB
/
unit_tests.yml
File metadata and controls
129 lines (106 loc) · 3.6 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
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
name: Unit tests
on:
push:
paths:
- '.github/workflows/**'
- 'src/**'
- 'utest/**'
- '!**/*.rst'
pull_request:
paths:
- '.github/workflows/**'
- 'src/**'
- 'utest/**'
- '!**/*.rst'
jobs:
test_using_builtin_python:
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
python-version: [ '2.7', '3.5', '3.6', '3.7', '3.8', '3.9.0-alpha - 3.9', 'pypy2', 'pypy3' ]
exclude:
- os: windows-latest
python-version: 'pypy2'
- os: windows-latest
python-version: 'pypy3'
runs-on: ${{ matrix.os }}
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: Disable NTP on macOS (https://github.com/actions/virtual-environments/issues/820)
run: |
sudo systemsetup -setusingnetworktime off
sudo rm -rf /etc/ntp.conf
if: runner.os == 'macOS'
- name: Run unit tests with coverage
run: |
python -m pip install coverage
python -m coverage run --branch utest/run.py -v
- name: Prepare HTML/XML coverage report
run: |
python -m coverage xml -i
if: always()
- uses: codecov/codecov-action@e34ee485244a5b5e6e4e1b96daa4a15c9073e4fc
with:
name: ${{ matrix.python-version }}-${{ matrix.os }}
if: always()
test_using_jython:
strategy:
fail-fast: false
matrix:
java: [ '1.8' ]
os: [ 'ubuntu-latest', 'windows-latest', 'macos-latest' ]
jython-version: [ '2.7.2' ]
include:
- os: windows-latest
set_codepage: chcp 850
runs-on: ${{ matrix.os }}
name: Jython (Java ${{ matrix.java }}) ${{ matrix.jython-version }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
architecture: 'x64'
- name: Install wget
run: |
choco install wget -y --no-progress
if: runner.os == 'Windows'
- name: Setup Jython ${{ matrix.jython-version }}
run: |
wget -nv "http://search.maven.org/remotecontent?filepath=org/python/jython-installer/${{ matrix.jython-version }}/jython-installer-${{ matrix.jython-version }}.jar" -O jytinst.jar
java -jar jytinst.jar -s -d jython/
- name: Disable NTP on macOS (https://github.com/actions/virtual-environments/issues/820)
run: |
sudo systemsetup -setusingnetworktime off
sudo rm -rf /etc/ntp.conf
if: runner.os == 'macOS'
- name: Run unit tests
run: |
${{ matrix.set_codepage }}
jython/bin/jython utest/run.py -v
test_using_ironpython:
strategy:
fail-fast: false
matrix:
os: [ 'windows-latest' ]
ironpython-version: [ '2.7.9' ]
runs-on: ${{ matrix.os }}
name: IronPython ${{ matrix.ironpython-version }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup IronPython ${{ matrix.ironpython-version }}
run: |
choco install ironpython -y --no-progress --version ${{ matrix.ironpython-version }}
ipy -m ensurepip --user
- name: Run unit tests
run: |
chcp 850
ipy utest/run.py -v