-
Notifications
You must be signed in to change notification settings - Fork 21
103 lines (88 loc) · 3.25 KB
/
kitchen-macos.yml
File metadata and controls
103 lines (88 loc) · 3.25 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Kitchen macOS
on:
workflow_dispatch:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
jobs:
macos:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
name: ${{ matrix.role }} (${{ matrix.runner }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- role: gecko_t_osx_1400_r8
runner: macos-14
suite: default-localhost
- role: gecko_t_osx_1500_m4
runner: macos-15
suite: default-localhost
- role: gecko_t_osx_1015_r8
runner: macos-15-intel
suite: default-localhost
env:
KITCHEN_YAML: .kitchen_configs/kitchen.circleci.yml
PUPPET_ROLE: ${{ matrix.role }}
VAULT_ADDR: http://127.0.0.1:8202
VAULT_TOKEN: root
PIP_BREAK_SYSTEM_PACKAGES: '1'
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Configure gem environment
run: |
RUBY_MINOR="$(ruby -e "puts RUBY_VERSION.split('.')[0..1].join('.') + '.0'")"
GEM_DEFAULT_DIR="$(ruby -e "puts Gem.default_dir")"
GEM_HOME="${HOME}/.gem/ruby/${RUBY_MINOR}"
echo "GEM_HOME=${GEM_HOME}" >> "$GITHUB_ENV"
echo "GEM_PATH=${GEM_HOME}:${GEM_DEFAULT_DIR}" >> "$GITHUB_ENV"
echo "${GEM_HOME}/bin" >> "$GITHUB_PATH"
- name: Cache gems
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: ~/.gem
key: v1-gems-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Gemfile.lock') }}
- name: Install gems
run: |
gem install bundler:2.5.23
bundle config unset path
bundle install
- name: Install Rosetta 2
if: runner.arch == 'ARM64'
run: /usr/sbin/softwareupdate --install-rosetta --agree-to-license
- name: Install Puppet agent
run: ./.github/scripts/install_puppet_mac.sh
- name: Install Vault
run: brew install vault
env:
HOMEBREW_NO_AUTO_UPDATE: 1
- name: Start Vault dev server
run: |
vault server -dev -dev-root-token-id="root" -dev-listen-address=127.0.0.1:8202 &
sleep 2
vault status
- name: Set up Terraform
uses: hashicorp/setup-terraform@5e8dbf3c6d9deaf4193ca7a8fb23f2ac83bb6c85 # v4.0.0
- name: Seed Vault with test data
run: |
terraform -chdir=test/integration/${{ matrix.role }}/terraform/ init -input=false -backend=false
terraform -chdir=test/integration/${{ matrix.role }}/terraform/ apply -var="role=${{ matrix.role }}" -input=false -auto-approve
- name: Kitchen converge
timeout-minutes: 30
run: kitchen converge ${{ matrix.suite }}
- name: Kitchen verify
run: kitchen verify ${{ matrix.suite }}
- name: Upload test results
if: always()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: rspec-${{ matrix.role }}-${{ matrix.runner }}
path: rspec/
if-no-files-found: ignore