-
Notifications
You must be signed in to change notification settings - Fork 4
103 lines (97 loc) · 2.79 KB
/
ci.yml
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: "Integration Tests"
on:
push:
paths:
- 'libraries/**'
- 'resources/**'
- 'test/**'
- 'ohai/**'
- '.github/workflows/ci.yml'
pull_request_target:
types: [labeled]
paths:
- 'libraries/**'
- 'resources/**'
- 'test/**'
- 'ohai/**'
- '.github/workflows/ci.yml'
workflow_call:
secrets:
FALCON_CLIENT_ID:
description: 'Falcon API Client ID'
required: true
FALCON_CLIENT_SECRET:
description: 'Falcon API Client Secret'
required: true
FALCON_CID:
description: 'Falcon API CID'
required: true
FALCON_CLOUD:
description: 'Falcon API Cloud'
required: true
FALCON_VERSION:
description: 'Falcon API Version'
required: true
jobs:
integration:
if: |
github.event_name == 'push' ||
github.event_name == 'schedule' ||
(github.event_name == 'pull_request_target' &&
github.event.label.name == 'ok-to-test')
runs-on: ubuntu-20.04
strategy:
matrix:
os:
- almalinux-8
- amazonlinux-2
- centos-7
- debian-10
- debian-11
# - opensuse-leap-15
- rockylinux-9
- ubuntu-1804
- ubuntu-2004
suite:
- default
- install-api-version
- install-api-policy
- install-api-decrement
- install-cleanup-installer
- install-local
- config-set
- config-delete
fail-fast: false
steps:
- name: Check out code
uses: actions/checkout@v3
if: github.event_name != 'pull_request_target'
- name: Check out code
uses: actions/checkout@v3
with:
ref: ${{github.event.pull_request.head.sha}}
if: github.event_name == 'pull_request_target'
- name: Install Chef
uses: actionshub/chef-install@main
- name: Run role tests
uses: nick-fields/retry@v2
env:
CHEF_LICENSE: accept-no-persist
KITCHEN_LOCAL_YAML: kitchen.yml
FALCON_CLIENT_ID: ${{ secrets.FALCON_CLIENT_ID }}
FALCON_CLIENT_SECRET: ${{ secrets.FALCON_CLIENT_SECRET }}
FALCON_CID: ${{ secrets.FALCON_CID }}
FALCON_CLOUD: ${{ secrets.FALCON_CLOUD }}
FALCON_VERSION: ${{ secrets.FALCON_VERSION }}
with:
timeout_minutes: 6
max_attempts: 3
retry_on: error
command: >-
chef exec kitchen test ${{ matrix.suite }}-${{ matrix.os }}
- name: Print debug output on failure
if: failure()
run: |
set -x
sudo journalctl -l --since today
KITCHEN_LOCAL_YAML=kitchen.yml /usr/bin/kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "journalctl -l"