]> git.openstreetmap.org Git - chef.git/blob - .github/workflows/test-kitchen.yml
imagery: restart mapserver every hour to limit memory leak
[chef.git] / .github / workflows / test-kitchen.yml
1 name: Test Kitchen
2
3 on:
4   - push
5   - pull_request
6   - workflow_dispatch
7
8 concurrency:
9   group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
10   cancel-in-progress: true
11
12 jobs:
13   kitchen:
14     name: Test Kitchen
15     runs-on: ubuntu-22.04
16     permissions:
17       packages: read
18     strategy:
19       matrix:
20         suite:
21           - accounts
22           - apache
23           - apt
24           - apt-repository
25           - backup
26           - bind
27           - blog
28           - blogs
29           - chef
30           - civicrm
31           - clamav
32           - community
33           - db-backup
34           - db-base
35           - db-master
36           - db-slave
37           - dev
38           - devices
39           - dhcpd
40           - dmca
41           - dns
42           - docker
43           - elasticsearch
44           - exim
45           - fail2ban
46           - foundation-birthday
47           - foundation-board
48           - foundation-dwg
49           - foundation-mastodon
50           - foundation-mwg
51           - foundation-owg
52           - foundation-welcome
53           - foundation-wiki
54           - ftp
55           - geodns
56           - geoipupdate
57           - git
58           - git-server
59           - git-web
60           - gps-tile
61           - hardware
62           - hot
63           - ideditor
64           - irc
65           - kibana
66           - letsencrypt
67           - logstash
68           - logstash-forwarder
69           - mail
70           - mailman
71           - matomo
72           - memcached
73           - mysql
74           - networking
75           - nginx
76           - nodejs
77           - nominatim
78           - ntp
79           - openssh
80           - osmosis
81           - osqa
82           - otrs
83           - overpass
84           - passenger
85           - php
86           - php-apache
87           - php-fpm
88           - planet
89           - planet-aws
90           - planet-current
91           - planet-dump
92           - planet-notes
93           - planet-replication
94           - postgresql
95           - prometheus
96           - prometheus-server
97           - python
98           - rsyncd
99           - serverinfo
100           - snmpd
101           - spamassassin
102           - ssl
103           - stateofthemap-container
104           - stateofthemap-wordpress
105           - subversion
106           - supybot
107           - switch2osm
108           - sysctl
109           - sysfs
110           - taginfo
111           - tile
112           - tilelog
113           - tools
114           - trac
115           - vectortile
116           - web-cgimap
117           - web-frontend
118           - web-rails
119           - wordpress
120           - wiki
121         os:
122           - ubuntu-2204
123         include:
124           - os: ubuntu-2004
125             suite: mailman
126           - os: ubuntu-2004
127             suite: osqa
128           - os: debian-12
129             suite: apt-repository
130           - os: debian-12
131             suite: dev
132           - os: debian-12
133             suite: dns
134           - os: debian-12
135             suite: git-server
136           - os: debian-12
137             suite: git-web
138           - os: debian-12
139             suite: imagery-tiler
140           - os: debian-12
141             suite: letsencrypt
142           - os: debian-12
143             suite: otrs
144           - os: debian-12
145             suite: serverinfo
146           - os: debian-12
147             suite: supybot
148           - os: debian-12
149             suite: vectortile
150           - os: debian-12
151             suite: web-cgimap
152           - os: debian-12
153             suite: web-frontend
154           - os: debian-12
155             suite: web-rails
156         exclude:
157           - suite: apt-repository
158             os: ubuntu-2204
159           - suite: dev
160             os: ubuntu-2204
161           - suite: dns
162             os: ubuntu-2204
163           - suite: git-server
164             os: ubuntu-2204
165           - suite: git-web
166             os: ubuntu-2204
167           - suite: mailman
168             os: ubuntu-2204
169           - suite: letsencrypt
170             os: ubuntu-2204
171           - suite: osqa
172             os: ubuntu-2204
173           - suite: otrs
174             os: ubuntu-2204
175           - suite: serverinfo
176             os: ubuntu-2204
177           - suite: supybot
178             os: ubuntu-2204
179           - suite: vectortile
180             os: ubuntu-2204
181           - suite: web-cgimap
182             os: ubuntu-2204
183           - suite: web-frontend
184             os: ubuntu-2204
185           - suite: web-rails
186             os: ubuntu-2204
187       fail-fast: false
188     steps:
189     - name: Login to GitHub Container Registry
190       uses: docker/login-action@v3
191       with:
192         registry: ghcr.io
193         username: ${{ github.actor }}
194         password: ${{ secrets.GITHUB_TOKEN }}
195     - name: Login to Docker Hub
196       uses: docker/login-action@v3
197       with:
198         username: ${{ secrets.DOCKERHUB_USERNAME }}
199         password: ${{ secrets.DOCKERHUB_TOKEN }}
200       if: github.repository == 'openstreetmap/chef' && github.event_name != 'pull_request'
201     - name: Check out code
202       uses: actions/checkout@v4
203     - name: Setup ruby
204       uses: ruby/setup-ruby@v1
205       with:
206         ruby-version: 3.1
207         bundler-cache: true
208     - name: Run kitchen test ${{ matrix.suite }}-${{ matrix.os }}
209       run: bundle exec kitchen test ${{ matrix.suite }}-${{ matrix.os }}
210     - name: Gather journal output
211       run: |
212         bundle exec kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "journalctl --since=yesterday"
213         bundle exec kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "networkctl status --all"
214         bundle exec kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "resolvectl status" || true
215       if: ${{ failure() }}