]> git.openstreetmap.org Git - chef.git/blob - .github/workflows/test-kitchen.yml
Add support for installing functions to a rendering database
[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           - web-cgimap
116           - web-frontend
117           - web-rails
118           - wordpress
119           - wiki
120         os:
121           - ubuntu-2204
122         include:
123           - os: ubuntu-2004
124             suite: mailman
125           - os: ubuntu-2004
126             suite: osqa
127           - os: debian-12
128             suite: apt-repository
129           - os: debian-12
130             suite: dev
131           - os: debian-12
132             suite: dns
133           - os: debian-12
134             suite: git-server
135           - os: debian-12
136             suite: git-web
137           - os: debian-12
138             suite: imagery-tiler
139           - os: debian-12
140             suite: letsencrypt
141           - os: debian-12
142             suite: otrs
143           - os: debian-12
144             suite: serverinfo
145           - os: debian-12
146             suite: supybot
147           - os: debian-12
148             suite: web-cgimap
149           - os: debian-12
150             suite: web-frontend
151           - os: debian-12
152             suite: web-rails
153         exclude:
154           - suite: apt-repository
155             os: ubuntu-2204
156           - suite: dev
157             os: ubuntu-2204
158           - suite: dns
159             os: ubuntu-2204
160           - suite: git-server
161             os: ubuntu-2204
162           - suite: git-web
163             os: ubuntu-2204
164           - suite: mailman
165             os: ubuntu-2204
166           - suite: letsencrypt
167             os: ubuntu-2204
168           - suite: osqa
169             os: ubuntu-2204
170           - suite: otrs
171             os: ubuntu-2204
172           - suite: serverinfo
173             os: ubuntu-2204
174           - suite: supybot
175             os: ubuntu-2204
176           - suite: web-cgimap
177             os: ubuntu-2204
178           - suite: web-frontend
179             os: ubuntu-2204
180           - suite: web-rails
181             os: ubuntu-2204
182       fail-fast: false
183     steps:
184     - name: Login to GitHub Container Registry
185       uses: docker/login-action@v3
186       with:
187         registry: ghcr.io
188         username: ${{ github.actor }}
189         password: ${{ secrets.GITHUB_TOKEN }}
190     - name: Login to Docker Hub
191       uses: docker/login-action@v3
192       with:
193         username: ${{ secrets.DOCKERHUB_USERNAME }}
194         password: ${{ secrets.DOCKERHUB_TOKEN }}
195       if: github.repository == 'openstreetmap/chef' && github.event_name != 'pull_request'
196     - name: Check out code
197       uses: actions/checkout@v4
198     - name: Setup ruby
199       uses: ruby/setup-ruby@v1
200       with:
201         ruby-version: 3.1
202         bundler-cache: true
203     - name: Run kitchen test ${{ matrix.suite }}-${{ matrix.os }}
204       run: bundle exec kitchen test ${{ matrix.suite }}-${{ matrix.os }}
205     - name: Gather journal output
206       run: |
207         bundle exec kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "journalctl --since=yesterday"
208         bundle exec kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "networkctl status --all"
209         bundle exec kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "resolvectl status" || true
210       if: ${{ failure() }}