-
Notifications
You must be signed in to change notification settings - Fork 20
83 lines (75 loc) · 2.77 KB
/
runtime_tests.yml
File metadata and controls
83 lines (75 loc) · 2.77 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
---
name: Runtime tests
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
env:
BUNDLE_WITHOUT: development
jobs:
vanagon_inspect:
name: Vanagon inspect
runs-on: ubuntu-24.04
steps:
- name: Checkout current PR
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install Ruby version 3.3
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true
- name: Vanagon inspect
run: |
stat=0
for projfile in configs/projects/[a-z]*.rb; do
for plat in el-8-x86_64 ubuntu-22.04-amd64 windows-all-x64; do
proj=$(basename -s .rb "$projfile")
if [[ "$proj" =~ ^pe- && "$plat" =~ ^(windows|osx) ]]; then
echo Skipping ${proj} on ${plat}, PE projects don\'t support Windows or macOS
continue
fi
echo Inspecting ${proj} on ${plat}
output=$(bundle exec vanagon inspect "$proj" "$plat")
if [ $? -ne 0 ]; then
stat=1
else
echo "$output" | jq '.[].name'
fi
done
done
# fail this step if there were any failures
if [ $stat -eq 1 ]; then
false
fi
- name: Run rubocop
run: bundle exec rubocop
# this takes roughly 10 minutes for linux, so it's fine to run it on all PRs
# MacOS / Windows takes ages, so we don't want to run this always
build:
needs: vanagon_inspect
name: build puppet-runtime for Linux
uses: 'openvoxproject/shared-actions/.github/workflows/build_vanagon.yml@main'
with:
project_name: 'agent-runtime-main'
# when we add new OSes here, we also need to add them in openvoxproject/shared-actions
# TODO: Split OS list into Linux and non-linux, then run Linux on all PRs
platform_list: amazon-2-aarch64,amazon-2-x86_64,amazon-2023-aarch64,amazon-2023-x86_64,debian-11-aarch64,debian-11-amd64,debian-12-aarch64,debian-12-amd64,debian-13-aarch64,debian-13-amd64,debian-13-armhf,el-8-aarch64,el-8-x86_64,el-9-aarch64,el-9-x86_64,el-10-x86_64,el-10-aarch64,fedora-42-x86_64,fedora-42-aarch64,fedora-43-x86_64,fedora-43-aarch64,sles-15-x86_64,ubuntu-22.04-aarch64,ubuntu-22.04-amd64,ubuntu-24.04-aarch64,ubuntu-24.04-amd64,ubuntu-24.04-armhf,ubuntu-25.04-amd64,ubuntu-25.04-aarch64,ubuntu-25.04-armhf
vanagon_branch: main
upload_to_s3: false
tests:
if: always()
needs:
- vanagon_inspect
- build
runs-on: ubuntu-24.04
name: Test suite
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}