]> git.openstreetmap.org Git - chef.git/blob - .github/workflows/test-kitchen.yml
45bfbf9f09cbd16aebd663810f6e1cebce4cde56
[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: imagery-tiler
126           - os: debian-12
127             suite: otrs
128         exclude:
129           - suite: mailman
130             os: ubuntu-2204
131           - suite: osqa
132             os: ubuntu-2204
133           - suite: otrs
134             os: ubuntu-2204
135       fail-fast: false
136     steps:
137     - name: Login to GitHub Container Registry
138       uses: docker/login-action@v3
139       with:
140         registry: ghcr.io
141         username: ${{ github.actor }}
142         password: ${{ secrets.GITHUB_TOKEN }}
143     - name: Check out code
144       uses: actions/checkout@v4
145     - name: Setup ruby
146       uses: ruby/setup-ruby@v1
147       with:
148         ruby-version: 3.1
149         bundler-cache: true
150     - name: Run kitchen test ${{ matrix.suite }}-${{ matrix.os }}
151       run: bundle exec kitchen test ${{ matrix.suite }}-${{ matrix.os }}
152     - name: Gather journal output
153       run: |
154         bundle exec kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "journalctl --since=yesterday"
155         bundle exec kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "networkctl status --all"
156         bundle exec kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "resolvectl status" || true
157       if: ${{ failure() }}