-
Notifications
You must be signed in to change notification settings - Fork 21
130 lines (116 loc) · 3.14 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
name: "Test"
on:
pull_request:
push:
branches:
- "main"
workflow_dispatch:
jobs:
test-xt:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: git submodule init
run: |
git submodule init
git submodule update --recursive
- name: Set up Perl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: "5.38"
install-modules-with: cpm
install-modules-args: --with-develop --with-configure
install-modules: |
Minilla
Test::CPAN::Meta
Test::Pod
Test::MinimumVersion::Fast
- name: Set up Redis
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: "6.2"
auto-start: false
- name: Test
run: |
minil test --all
list:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: list
id: set-matrix
run: |
import json
import os
perl = [
'5.38',
'5.36',
'5.34',
'5.32',
'5.30',
'5.28',
'5.26',
'5.24',
'5.22',
'5.20',
'5.18',
'5.16',
'5.14',
]
redis = [
'7.0',
'6.2',
'6.0',
'5.0',
'4.0',
'3.2',
'3.0',
'2.8',
]
includes = []
for r in redis:
includes.append({'perl': perl[0], 'redis': r, 'os': 'macos-latest'})
matrix = {
'perl': perl,
'redis': redis,
'os': ['ubuntu-latest'],
'include': includes
}
output = json.dumps(matrix, separators=(',', ':'))
with open(os.environ["GITHUB_OUTPUT"], 'a', encoding="utf-8") as f:
f.write('matrix={0}'.format(output))
shell: python
test:
runs-on: ${{ matrix.os }}
needs: list
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.list.outputs.matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: git submodule init
run: |
git submodule init
git submodule update --recursive
- name: Set up Perl ${{ matrix.perl }}
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
install-modules-with: cpm
install-modules-args: --with-develop --with-configure
# xxx: we not depend URI directly, however install it explicitly.
# because cpm sometimes installs old version of URI.
install-modules: Minilla URI
- name: Set up Redis ${{ matrix.redis }}
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: ${{ matrix.redis }}
auto-start: false
- name: Test
run: |
minil test --norelease --noauthor --noautomated
env:
REDIS_DEBUG: "1"