Repository navigation
107 lines (91 loc) · 3.29 KB
/
Copy pathself-test.yml
File metadata and controls
107 lines (91 loc) · 3.29 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
name: self-tests
on:
workflow_dispatch: # run on manual trigger
push: # run on push events
pull_request: # run on pull requests
jobs:
run-tests:
strategy:
# Allow all other matrix-jobs to continue running, even if one of the jobs fails
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
build_env: [native]
python: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14]
include:
- os: windows-latest
build_env: msys
python: msys
runs-on: ${{ matrix.os }}
steps:
- name: Cloning TextTest
uses: actions/checkout@v6
with:
repository: texttest/texttest
path: texttest
- name: Cloning SelfTests
uses: actions/checkout@v6
with:
path: tests/selftest
- name: Configuring Python
if: matrix.build_env != 'msys'
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
architecture: x64
- uses: msys2/setup-msys2@v2
if: matrix.build_env == 'msys'
with:
update: true
install: >
git mingw-w64-x86_64-python-setuptools mingw-w64-x86_64-python-cx-freeze mingw-w64-x86_64-python-gobject
mingw-w64-x86_64-python-pytest mingw-w64-x86_64-python-pip mingw-w64-x86_64-python-matplotlib
mingw-w64-x86_64-python-certifi mingw-w64-x86_64-python-psutil mingw-w64-x86_64-python-yaml
mingw-w64-x86_64-gtksourceview4 mingw-w64-x86_64-gsettings-desktop-schemas diffutils glib2-devel intltool
- name: Preparing Virtual Environment (Linux)
if: runner.os == 'Linux'
run: |
python -m venv venv
venv/bin/pip install capturemock $PWD/texttest
- name: Preparing Virtual Environment (Windows)
if: runner.os == 'Windows' && matrix.build_env != 'msys'
run: |
python -m venv venv
venv\Scripts\pip.exe install capturemock $PWD/texttest
- name: Preparing Virtual Environment (Msys2)
if: matrix.build_env == 'msys'
run: |
python -m venv venv
venv/Scripts/pip install capturemock $PWD/texttest
- name: Running Linux Tests
if: runner.os == 'Linux'
run: |
export TEXTTEST_HOME=$PWD/tests
venv/bin/texttest -c $PWD/venv -b ci -v ci
- name: Compressing Test Results (Linux)
if: failure() && runner.os == 'Linux'
run: |
zip -r ~/.texttest/ttt.zip ~/.texttest/tmp/
- name: Running Windows Tests
if: runner.os == 'Windows' && matrix.build_env != 'msys'
run: |
$env:TEXTTEST_HOME = "$pwd\tests"
venv\Scripts\texttestc.exe -c $PWD\venv -b ci -v ci
- name: Running MSYS Tests
if: matrix.build_env == 'msys'
shell: msys2 {0}
run: |
export TEXTTEST_HOME=$PWD/tests
venv/Scripts/texttestc.exe -c $PWD/venv -b ci -v ci
- name: Compressing Test Results (Windows)
if: failure() && runner.os == 'Windows'
run: |
Compress-Archive -Path $HOME/.texttest/tmp -DestinationPath $HOME/.texttest/ttt.zip
dir $HOME/.texttest/tmp
- name: Uploading test results
if: failure()
uses: actions/upload-artifact@v7
with:
name: texttesttmp-${{ runner.os }}-Py${{ matrix.python }}
path: ~/.texttest/ttt.zip
if-no-files-found: warn