11# This workflow runs the test suites with different versions of python
22name : tests
33
4- on : [push, pull_request]
4+ on :
5+ push :
6+ branches : [ master ]
7+ pull_request :
8+ branches : [ master ]
59
610jobs :
711 tests :
@@ -14,74 +18,74 @@ jobs:
1418 # pub400 closes the connection if there are too many requests coming from the same IP address
1519 max-parallel : 1
1620 matrix :
17- python-version : ["3.8", "3.12", "3.13 "]
21+ python-version : ["3.12 "]
1822 os : [ubuntu-latest, windows-latest]
1923 fail-fast : false
2024
2125 steps :
22- - name : Checkout repository
23- uses : actions/checkout@v3
24-
25- - name : Set up python
26- uses : actions/setup-python@v4
27- with :
28- python-version : ${{ matrix.python-version }}
29-
30- - name : Install dependencies linux
31- if : matrix.os == 'ubuntu-latest'
32- run : |
33- sudo apt-get install -y xvfb x3270 locales xterm
34- sudo locale-gen en_US
35-
36- - name : Install dependencies windows
37- if : matrix.os == 'windows-latest'
38- run : |
39- choco install wc3270
40- echo "C:\Program Files\wc3270" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
41-
42- - name : Install python dependencies
43- run : |
44- python -m pip install -r requirements-dev.txt
45-
46- - name : Lint
47- run : |
48- inv lint
49-
50- - name : Run utests with coverage
51- run : |
52- coverage run --branch --source Mainframe3270/ -m pytest --verbose utest/
53- coverage report
54- coverage xml
55-
56- - name : Upload unit test coverage to Codecov
57- uses : codecov/codecov-action@v3
58- with :
59- files : coverage.xml
60- flags : unit
61- move_coverage_to_trash : true
62-
63- - name : Run atests with coverage linux
64- if : matrix.os == 'ubuntu-latest'
65- run : |
66- LANG=en_US.iso88591 xvfb-run coverage run --branch --source Mainframe3270/ -m robot $ROBOT_OPTIONS atest/
67- coverage report
68- coverage xml
69-
70- - name : Run atests with coverage windows
71- if : matrix.os == 'windows-latest'
72- run : |
73- coverage run --branch --source Mainframe3270/ -m robot $ROBOT_OPTIONS atest/
74- coverage report
75- coverage xml
76-
77- - name : Upload acceptance tests coverage to Codecov
78- uses : codecov/codecov-action@v3
79- with :
80- files : coverage.xml
81- flags : acceptance
82-
83- - uses : actions/upload-artifact@v4
84- if : ${{ always() }}
85- with :
86- name : Tests results python${{ matrix.python-version }} - ${{ matrix.os }}
87- path : logs/
26+ - name : Checkout repository
27+ uses : actions/checkout@v3
28+
29+ - name : Set up python
30+ uses : actions/setup-python@v4
31+ with :
32+ python-version : ${{ matrix.python-version }}
33+
34+ - name : Install dependencies linux
35+ if : matrix.os == 'ubuntu-latest'
36+ run : |
37+ sudo apt-get install -y xvfb x3270 locales xterm
38+ sudo locale-gen en_US
39+
40+ - name : Install dependencies windows
41+ if : matrix.os == 'windows-latest'
42+ run : |
43+ choco install wc3270
44+ echo "C:\Program Files\wc3270" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
45+
46+ - name : Install python dependencies
47+ run : |
48+ python -m pip install -r requirements-dev.txt
49+
50+ - name : Lint
51+ run : |
52+ inv lint
53+
54+ - name : Run utests with coverage
55+ run : |
56+ coverage run --branch --source Mainframe3270/ -m pytest --verbose utest/
57+ coverage report
58+ coverage xml
59+
60+ - name : Upload unit test coverage to Codecov
61+ uses : codecov/codecov-action@v3
62+ with :
63+ files : coverage.xml
64+ flags : unit
65+ move_coverage_to_trash : true
66+
67+ - name : Run atests with coverage linux
68+ if : matrix.os == 'ubuntu-latest'
69+ run : |
70+ LANG=en_US.iso88591 xvfb-run coverage run --branch --source Mainframe3270/ -m robot $ROBOT_OPTIONS atest/
71+ coverage report
72+ coverage xml
73+
74+ - name : Run atests with coverage windows
75+ if : matrix.os == 'windows-latest'
76+ run : |
77+ coverage run --branch --source Mainframe3270/ -m robot $ROBOT_OPTIONS atest/
78+ coverage report
79+ coverage xml
80+
81+ - name : Upload acceptance tests coverage to Codecov
82+ uses : codecov/codecov-action@v3
83+ with :
84+ files : coverage.xml
85+ flags : acceptance
86+
87+ - uses : actions/upload-artifact@v4
88+ if : ${{ always() }}
89+ with :
90+ name : Tests results python${{ matrix.python-version }} - ${{ matrix.os }}
91+ path : logs/
0 commit comments