-
Notifications
You must be signed in to change notification settings - Fork 7
162 lines (159 loc) · 6.89 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: CI
on:
push:
branches-ignore:
- '*travis*'
- '*appveyor*'
- '*gitlab*'
- '*doozer*'
pull_request:
jobs:
test:
name: ${{ matrix.os }} ${{ matrix.add_name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
## XXX windows not yet working, macos not tested --- TODO
include:
- os: 'ubuntu-20.04'
add_name: '+ gui tests'
bbbike_test_gui: 1
use_modperl: 0
use_bbbike_ppa: 1
bbbike_test_skip_modperl: 1
- os: 'ubuntu-20.04'
add_name: '+ mod_perl'
bbbike_test_gui: 0
use_modperl: 1
use_bbbike_ppa: 1
bbbike_test_skip_modperl: 0
- os: 'ubuntu-22.04'
add_name: '+ gui tests'
bbbike_test_gui: 1
use_modperl: 0
use_bbbike_ppa: 1
bbbike_test_skip_modperl: 1
steps:
- name: network check
shell: bash
run: |
set -ex
echo "My IP address: $(curl -s ipinfo.io/ip)"; true
{ set -o pipefail; curl -s -I http://bbbike.de/robots.txt | head -1; } || { echo "::warning::network check on bbbike.de port 80 failed"; echo "BBBIKE_TEST_SKIP_BBBIKE_DE=1" >> "$GITHUB_ENV"; }
{ set -o pipefail; curl -s -I https://download.bbbike.org | head -1; } || { echo "::warning::network check on download.bbbike.org port 443 failed"; echo "BBBIKE_TEST_SKIP_BBBIKE_ORG=1" >> "$GITHUB_ENV"; }
{ set -o pipefail; curl -s -I http://mydebs.bbbike.de:8000/dists/jessie/InRelease | head -1; true; } || { echo "::warning::network check on port 8000 failed"; }
- name: apt hacks
# the already installed libgd3 conflicts with libgd-dev to be installed
# also, /etc/apt/sources.list should be sufficient; all the other repositories are possibly problematic
run: |
sudo rm -f /etc/apt/sources.list.d/*.list
sudo apt-get update -qq
sudo apt-get remove -y libgd3 nginx
if: "startsWith(matrix.os, 'ubuntu-')"
- uses: actions/checkout@v4
with:
show-progress: false
- name: Build and test
env:
USE_SYSTEM_PERL: 1
USE_MODPERL: ${{ matrix.use_modperl }}
USE_BBBIKE_PPA: ${{ matrix.use_bbbike_ppa }}
BBBIKE_TEST_SKIP_MODPERL: ${{ matrix.bbbike_test_skip_modperl }}
BBBIKE_TEST_GUI: ${{ matrix.bbbike_test_gui }}
TRY_MYDEBS_BBBIKE_DE_FALLBACK_PORT: 1
run: |
set -e
export CI_BUILD_DIR=$GITHUB_WORKSPACE
# before_install:
. port/ci/ci-functions.sh
init_ci
wrapper init_env_vars
wrapper init_perl
wrapper init_apt
wrapper install_non_perl_dependencies
wrapper install_perl_testonly_dependencies
wrapper install_old_perl_dependencies
wrapper install_webserver_dependencies
wrapper install_selenium
# install:
wrapper install_perl_dependencies
# before_script:
wrapper init_cgi_config
wrapper fix_cgis
wrapper init_webserver_config
wrapper start_webserver
wrapper start_xserver
wrapper init_webserver_environment
wrapper start_selenium
wrapper init_data
# script:
perl Makefile.PL && make test HARNESS_OPTIONS=j4 HARNESS_TIMER=1
# after_script:
make distcheck
used_config
if: "!startsWith(matrix.os,'windows-')"
test_in_container:
name: Docker tests with ${{ matrix.dist }}:${{ matrix.distver }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- dist: debian
distver: jessie
bbbike_test_skip_mapserver: 0
use_bbbike_ppa: 0
- dist: debian
distver: stretch
bbbike_test_skip_mapserver: 0
use_bbbike_ppa: 0
- dist: debian
distver: buster
bbbike_test_skip_mapserver: 0
use_bbbike_ppa: 0
- dist: debian
distver: bullseye
bbbike_test_skip_mapserver: 0
use_bbbike_ppa: 0
- dist: debian
distver: bookworm
bbbike_test_skip_mapserver: 0
use_bbbike_ppa: 0
- dist: ubuntu
distver: bionic
bbbike_test_skip_mapserver: 0
use_bbbike_ppa: 1
- dist: ubuntu
distver: trusty
bbbike_test_skip_mapserver: 0
use_bbbike_ppa: 0
## XXX only prepared, but this does not work yet (missing docker-bbbike support for non-system perl)
#- dist: perl
# distver: 5.38.0-slim-bookworm
# bbbike_test_skip_mapserver: 1
# use_bbbike_ppa: 0
- dist: ubuntu
distver: noble
bbbike_test_skip_mapserver: 0
use_bbbike_ppa: 1
env:
TRY_MYDEBS_BBBIKE_DE_FALLBACK_PORT: 1
steps:
- name: network check
shell: bash
run: |
set -ex
echo "My IP address: $(curl -s ipinfo.io/ip)"; true
{ set -o pipefail; curl -s -I http://bbbike.de/robots.txt | head -1; } || { echo "::warning::network check on bbbike.de port 80 failed"; echo "BBBIKE_TEST_SKIP_BBBIKE_DE=1" >> "$GITHUB_ENV"; }
{ set -o pipefail; curl -s -I https://download.bbbike.org | head -1; } || { echo "::warning::network check on download.bbbike.org port 443 failed"; echo "BBBIKE_TEST_SKIP_BBBIKE_ORG=1" >> "$GITHUB_ENV"; }
{ set -o pipefail; curl -s -I http://mydebs.bbbike.de:8000/dists/jessie/InRelease | head -1; true; } || { echo "::warning::network check on port 8000 failed"; }
- uses: actions/checkout@v4
- name: Build and test
run: |
set -e
sudo apt-get install -y libipc-run-perl
./miscsrc/docker-bbbike test --dist ${{ matrix.dist }} --distver ${{ matrix.distver }} --src local --jobs 8 \
--env BBBIKE_TEST_SKIP_MAPSERVER=${{ matrix.bbbike_test_skip_mapserver }} \
--env USE_BBBIKE_PPA=${{ matrix.use_bbbike_ppa }} \
--env BBBIKE_TEST_SKIP_BBBIKE_DE=${BBBIKE_TEST_SKIP_BBBIKE_DE:-0} \
--env BBBIKE_TEST_SKIP_BBBIKE_ORG=${BBBIKE_TEST_SKIP_BBBIKE_ORG:-0} \
--build-env TRY_MYDEBS_BBBIKE_DE_FALLBACK_PORT=${{ env.TRY_MYDEBS_BBBIKE_DE_FALLBACK_PORT }}