-
Notifications
You must be signed in to change notification settings - Fork 222
82 lines (75 loc) · 2.1 KB
/
smart-proxy.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
---
name: Foreman Proxy
on:
pull_request:
push:
branches:
- 'develop'
- '*-stable'
env:
BUNDLE_WITHOUT: "development"
concurrency:
group: ${{ github.ref_name }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
setup_matrix:
name: Setup matrix
runs-on: ubuntu-24.04
outputs:
matrix: ${{ steps.build_matrix.outputs.matrix }}
steps:
- name: Build test matrix
id: build_matrix
uses: theforeman/gha-matrix-builder@v0
rubocop:
name: Rubocop
needs: setup_matrix
runs-on: ubuntu-24.04
env:
BUNDLE_WITHOUT: bmc:development:dhcp_isc_inotify:dhcp_isc_kqueue:journald:krb5:libvirt:puppetca_token_whitelisting:realm_freeipa:windows
steps:
- uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ fromJson(needs.setup_matrix.outputs.matrix).ruby[0] }}
bundler-cache: true
- name: Run rubocop
run: bundle exec rubocop -P
tests:
name: "Test - Ruby ${{ matrix.ruby }}"
runs-on: ubuntu-24.04
needs:
- setup_matrix
- rubocop
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.setup_matrix.outputs.matrix) }}
steps:
- run: sudo apt-get update
- run: sudo apt-get -qq -y install build-essential libcurl4-openssl-dev zlib1g-dev libvirt-dev libsystemd-dev
- name: "Check out Foreman Proxy"
uses: actions/checkout@v4
- name: "Set up Ruby ${{ matrix.ruby }}"
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Archive Gemfile.lock
uses: actions/upload-artifact@v4
with:
name: Gemfile-ruby-${{ matrix.ruby }}.lock
path: Gemfile.lock
- name: Run rake test
run: bundle exec rake test
result:
if: always()
name: Test suite
runs-on: ubuntu-24.04
needs:
- tests
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}