]> git.openstreetmap.org Git - chef.git/blob - .github/workflows/test-kitchen.yml
Add cmok server
[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-board
47           - foundation-dwg
48           - foundation-mastodon
49           - foundation-mwg
50           - foundation-owg
51           - foundation-welcome
52           - foundation-wiki
53           - ftp
54           - geodns
55           - geoipupdate
56           - git
57           - git-server
58           - git-web
59           - gps-tile
60           - hardware
61           - hot
62           - ideditor
63           - irc
64           - kibana
65           - letsencrypt
66           - logstash
67           - logstash-forwarder
68           - mail
69           - mailman
70           - matomo
71           - memcached
72           - mysql
73           - networking
74           - nginx
75           - nodejs
76           - nominatim
77           - ntp
78           - openssh
79           - osmosis
80           - osqa
81           - otrs
82           - overpass
83           - passenger
84           - php
85           - php-apache
86           - php-fpm
87           - planet
88           - planet-aws
89           - planet-current
90           - planet-dump
91           - planet-notes
92           - planet-replication
93           - postgresql
94           - prometheus
95           - prometheus-server
96           - python
97           - rsyncd
98           - serverinfo
99           - snmpd
100           - spamassassin
101           - ssl
102           - stateofthemap-container
103           - stateofthemap-wordpress
104           - subversion
105           - supybot
106           - switch2osm
107           - sysctl
108           - sysfs
109           - taginfo
110           - tile
111           - tilelog
112           - tools
113           - trac
114           - web-cgimap
115           - web-frontend
116           - web-rails
117           - wordpress
118           - wiki
119         os:
120           - ubuntu-2204
121         include:
122           - os: ubuntu-2004
123             suite: mailman
124           - os: ubuntu-2004
125             suite: osqa
126           - os: debian-12
127             suite: apt-repository
128           - os: debian-12
129             suite: dev
130           - os: debian-12
131             suite: dns
132           - os: debian-12
133             suite: git-server
134           - os: debian-12
135             suite: git-web
136           - os: debian-12
137             suite: imagery-tiler
138           - os: debian-12
139             suite: letsencrypt
140           - os: debian-12
141             suite: otrs
142           - os: debian-12
143             suite: serverinfo
144           - os: debian-12
145             suite: supybot
146           - os: debian-12
147             suite: web-cgimap
148           - os: debian-12
149             suite: web-frontend
150           - os: debian-12
151             suite: web-rails
152         exclude:
153           - suite: apt-repository
154             os: ubuntu-2204
155           - suite: dev
156             os: ubuntu-2204
157           - suite: dns
158             os: ubuntu-2204
159           - suite: git-server
160             os: ubuntu-2204
161           - suite: git-web
162             os: ubuntu-2204
163           - suite: mailman
164             os: ubuntu-2204
165           - suite: letsencrypt
166             os: ubuntu-2204
167           - suite: osqa
168             os: ubuntu-2204
169           - suite: otrs
170             os: ubuntu-2204
171           - suite: serverinfo
172             os: ubuntu-2204
173           - suite: supybot
174             os: ubuntu-2204
175           - suite: web-cgimap
176             os: ubuntu-2204
177           - suite: web-frontend
178             os: ubuntu-2204
179           - suite: web-rails
180             os: ubuntu-2204
181       fail-fast: false
182     steps:
183     - name: Login to GitHub Container Registry
184       uses: docker/login-action@v3
185       with:
186         registry: ghcr.io
187         username: ${{ github.actor }}
188         password: ${{ secrets.GITHUB_TOKEN }}
189     - name: Login to Docker Hub
190       uses: docker/login-action@v3
191       with:
192         username: ${{ secrets.DOCKERHUB_USERNAME }}
193         password: ${{ secrets.DOCKERHUB_TOKEN }}
194       if: github.repository == 'openstreetmap/chef' && github.event_name != 'pull_request'
195     - name: Check out code
196       uses: actions/checkout@v4
197     - name: Setup ruby
198       uses: ruby/setup-ruby@v1
199       with:
200         ruby-version: 3.1
201         bundler-cache: true
202     - name: Run kitchen test ${{ matrix.suite }}-${{ matrix.os }}
203       run: bundle exec kitchen test ${{ matrix.suite }}-${{ matrix.os }}
204     - name: Gather journal output
205       run: |
206         bundle exec kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "journalctl --since=yesterday"
207         bundle exec kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "networkctl status --all"
208         bundle exec kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "resolvectl status" || true
209       if: ${{ failure() }}