]> git.openstreetmap.org Git - chef.git/blob - .github/workflows/test-kitchen.yml
ef0b6cbb5fc62a788662a3d1ac6b4ae1a2b8f603
[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           - backup
25           - bind
26           - blog
27           - blogs
28           - chef
29           - civicrm
30           - clamav
31           - community
32           - db-backup
33           - db-base
34           - db-master
35           - db-slave
36           - devices
37           - dhcpd
38           - dmca
39           - dns
40           - docker
41           - elasticsearch
42           - exim
43           - fail2ban
44           - foundation-board
45           - foundation-dwg
46           - foundation-mastodon
47           - foundation-mwg
48           - foundation-owg
49           - foundation-welcome
50           - foundation-wiki
51           - ftp
52           - geodns
53           - geoipupdate
54           - git
55           - git-server
56           - git-web
57           - gps-tile
58           - hardware
59           - hot
60           - ideditor
61           - irc
62           - kibana
63           - letsencrypt
64           - logstash
65           - logstash-forwarder
66           - mail
67           - mailman
68           - matomo
69           - memcached
70           - mysql
71           - networking
72           - nginx
73           - nodejs
74           - nominatim
75           - ntp
76           - openssh
77           - osmosis
78           - osqa
79           - otrs
80           - overpass
81           - passenger
82           - php
83           - php-apache
84           - php-fpm
85           - planet
86           - planet-aws
87           - planet-current
88           - planet-dump
89           - planet-notes
90           - planet-replication
91           - postgresql
92           - prometheus
93           - prometheus-server
94           - python
95           - rsyncd
96           - serverinfo
97           - snmpd
98           - spamassassin
99           - ssl
100           - stateofthemap-container
101           - stateofthemap-wordpress
102           - subversion
103           - supybot
104           - switch2osm
105           - sysctl
106           - sysfs
107           - taginfo
108           - tile
109           - tilelog
110           - tools
111           - trac
112           - web-cgimap
113           - web-frontend
114           - web-rails
115           - wordpress
116           - wiki
117         os:
118           - ubuntu-2204
119         include:
120           - os: ubuntu-2004
121             suite: mailman
122           - os: ubuntu-2004
123             suite: osqa
124           - os: debian-12
125             suite: dns
126           - os: debian-12
127             suite: git-server
128           - os: debian-12
129             suite: git-web
130           - os: debian-12
131             suite: imagery-tiler
132           - os: debian-12
133             suite: letsencrypt
134           - os: debian-12
135             suite: otrs
136           - os: debian-12
137             suite: serverinfo
138           - os: debian-12
139             suite: supybot
140         exclude:
141           - suite: dns
142             os: ubuntu-2204
143           - suite: git-server
144             os: ubuntu-2204
145           - suite: git-web
146             os: ubuntu-2204
147           - suite: mailman
148             os: ubuntu-2204
149           - suite: letsencrypt
150             os: ubuntu-2204
151           - suite: osqa
152             os: ubuntu-2204
153           - suite: otrs
154             os: ubuntu-2204
155           - suite: serverinfo
156             os: ubuntu-2204
157           - suite: supybot
158             os: ubuntu-2204
159       fail-fast: false
160     steps:
161     - name: Login to GitHub Container Registry
162       uses: docker/login-action@v3
163       with:
164         registry: ghcr.io
165         username: ${{ github.actor }}
166         password: ${{ secrets.GITHUB_TOKEN }}
167     - name: Check out code
168       uses: actions/checkout@v4
169     - name: Setup ruby
170       uses: ruby/setup-ruby@v1
171       with:
172         ruby-version: 3.1
173         bundler-cache: true
174     - name: Run kitchen test ${{ matrix.suite }}-${{ matrix.os }}
175       run: bundle exec kitchen test ${{ matrix.suite }}-${{ matrix.os }}
176     - name: Gather journal output
177       run: |
178         bundle exec kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "journalctl --since=yesterday"
179         bundle exec kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "networkctl status --all"
180         bundle exec kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "resolvectl status" || true
181       if: ${{ failure() }}