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