-
Notifications
You must be signed in to change notification settings - Fork 29
133 lines (122 loc) · 3.31 KB
/
test.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
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
130
131
132
133
name: Run automated tests
on:
push:
paths-ignore:
- '**.md'
- '.git*'
pull_request:
schedule:
- cron: '17 7 9,19,29 * *'
jobs:
linux:
name: linux-py${{ matrix.py }}
runs-on: ubuntu-latest
container: python:${{ matrix.py }}
strategy:
matrix:
py:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: CI setup
run: |-
git config --global --add safe.directory $(pwd)
- name: Run functional tests
run: make -C tests test-verbose
env:
TEST_SUBPROCESS_TIMEOUT: 300
- name: Run packaging tests
run: make -C pypi test
other:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- windows-latest
- macos-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Remove py.exe on Windows
run: del /f %WINDIR%\py.exe
shell: cmd
if: matrix.os == 'windows-latest'
- name: Configure Windows environment variables
run: |
echo "PY=python" >> $GITHUB_ENV
echo "TEMP=C:\tmp" >> $GITHUB_ENV # remove when pip>22.0.3 is released
mkdir -p "C:\tmp" # see https://github.com/sio/Makefile.venv/issues/17
shell: bash
if: matrix.os == 'windows-latest'
- name: Run functional tests
run: make -C tests test-verbose
env:
TEST_SUBPROCESS_TIMEOUT: 300
- name: Run packaging tests
run: make -C pypi test
cygwin:
name: windows-cygwin
runs-on: windows-latest
env:
CYGWIN_ROOT: D:\cygwin
CYGWIN_PACKAGES: "\
make,\
python3,\
git,\
bash,\
python-pip-wheel,\
python-setuptools-wheel,\
python-wheel-wheel"
CYGWIN_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
LC_ALL: C.UTF-8
LANG: C.UTF-8
SHELLOPTS: igncr
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Cygwin
run: >
md %CYGWIN_ROOT% &&
choco install cygwin --params='"/InstallDir:%CYGWIN_ROOT%"' &&
%CYGWIN_ROOT%\cygwinsetup.exe
--quiet-mode
--no-desktop
--download
--local-install
--no-verify
--site "%CYGWIN_MIRROR%"
--local-package-dir "%CYGWIN_ROOT%"
--root "%CYGWIN_ROOT%"
--packages "%CYGWIN_PACKAGES%"
shell: cmd
- name: Workaround for repo permissions mixup (https://stackoverflow.com/questions/7184941)
shell: D:\cygwin\bin\bash.exe "{0}"
run: |
set -v
export PATH=/bin
set -euo pipefail
chown $(id -u):$(id -g) .
mkdir -p "$HOME"
touch "$HOME/.gitconfig"
git config --global --add safe.directory "$PWD"
- name: Run automated tests
shell: D:\cygwin\bin\bash.exe "{0}"
run: |
export PATH=/bin
make -C tests test-verbose
env:
TEST_SUBPROCESS_TIMEOUT: 300
- name: Failure diagnostics
run: |
find "$CYGWIN_ROOT" -type f
env
shell: bash
if: failure()