-
Notifications
You must be signed in to change notification settings - Fork 21
77 lines (65 loc) · 2.12 KB
/
kitchen-linux.yml
File metadata and controls
77 lines (65 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Kitchen Linux
on:
workflow_dispatch:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
jobs:
linux:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
name: ${{ matrix.kitchen_target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
kitchen_target:
- linux-netperf-ubuntu-1804
- linux-perf-ubuntu-1804
- linux-perf-ubuntu-2404
- bitbar-ubuntu-2204
env:
KITCHEN_YAML: .kitchen_configs/kitchen.docker.yml
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Ruby
uses: ruby/setup-ruby@319994f95fa847cf3fb3cd3dbe89f6dcde9f178f # v1.221.0
with:
ruby-version: '3.2'
bundler-cache: false
- name: Cache gems
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: ~/.gem
key: v1-gems-${{ runner.os }}-${{ hashFiles('Gemfile.lock') }}
- name: Bundle install
run: |
gem install bundler:2.5.23
bundle install
- name: Prepare apt cache mount
run: mkdir -p /tmp/docker/var/cache/apt
- name: Rate-limit avoidance sleep
run: |
sleep_duration=$((RANDOM % 61))
echo "Sleeping for $sleep_duration seconds..."
sleep $sleep_duration
- name: Kitchen converge
timeout-minutes: 30
run: bundle exec kitchen converge ${{ matrix.kitchen_target }}
- name: Kitchen verify
run: bundle exec kitchen verify ${{ matrix.kitchen_target }}
- name: Kitchen destroy
if: always()
run: bundle exec kitchen destroy ${{ matrix.kitchen_target }}
- name: Upload test results
if: always()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: rspec-${{ matrix.kitchen_target }}
path: rspec/
if-no-files-found: ignore