Skip to content

Commit d9f8eee

Browse files
h-haaksbastelfreak
authored andcommitted
Use multinode setfile in ci workflow
1 parent 961ee15 commit d9f8eee

File tree

2 files changed

+80
-1
lines changed

2 files changed

+80
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313

1414
concurrency:
1515
group: ${{ github.ref_name }}
16-
cancel-in-progress: true
16+
#cancel-in-progress: true
1717

1818
jobs:
1919
puppet:

.github/workflows/ci2.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
name: 'Multinode Acceptance Testing'
3+
4+
on:
5+
pull_request: {}
6+
push:
7+
branches:
8+
- main
9+
- master
10+
11+
concurrency:
12+
group: ${{ github.ref_name }}
13+
#cancel-in-progress: true
14+
15+
jobs:
16+
setup_matrix:
17+
name: 'Static validations'
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 40
20+
outputs:
21+
puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }}
22+
puppet_beaker_test_matrix: ${{ steps.get-outputs.outputs.puppet_beaker_test_matrix }}
23+
env:
24+
BUNDLE_WITHOUT: development:system_tests:release
25+
PUPPET_GEM_VERSION: ">= 7.0"
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Setup ruby
29+
uses: ruby/setup-ruby@v1
30+
with:
31+
ruby-version: '3.2'
32+
bundler-cache: true
33+
- name: Setup Test Matrix
34+
id: get-outputs
35+
run: bundle exec metadata2gha --pidfile-workaround false
36+
37+
acceptance:
38+
needs: setup_matrix
39+
runs-on: ubuntu-20.04
40+
env:
41+
BEAKER_HYPERVISOR: docker
42+
BUNDLE_WITHOUT: development:test:release
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
puppet: ${{fromJson(needs.setup_matrix.outputs.puppet_beaker_test_matrix)}}
47+
mongodb:
48+
- name: MongoDB 4.4
49+
value: '4.4'
50+
- name: MongoDB 5.0
51+
value: '5.0'
52+
- name: MongoDB 6.0
53+
value: '6.0'
54+
- name: MongoDB 7.0
55+
value: '7.0'
56+
name: ${{ matrix.puppet.name }} - ${{ matrix.mongodb.name }}
57+
steps:
58+
- uses: actions/checkout@v4
59+
- name: Setup ruby
60+
uses: ruby/setup-ruby@v1
61+
with:
62+
ruby-version: '3.2'
63+
bundler-cache: true
64+
- name: Run tests
65+
run: bundle exec rake beaker
66+
env:
67+
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet.env.BEAKER_PUPPET_COLLECTION }}
68+
BEAKER_setfile: ${{ matrix.puppet.env.BEAKER_SETFILE }}shard.ma{hostname=${{ matrix.puppet.env.BEAKER_SETFILE }}-1-${{ matrix.puppet.env.BEAKER_PUPPET_COLLECTION }}.example.com}-${{ matrix.puppet.env.BEAKER_SETFILE }}slave,router.a{hostname=${{ matrix.puppet.env.BEAKER_SETFILE }}-2-${{ matrix.puppet.env.BEAKER_PUPPET_COLLECTION }}.example.com}
69+
BEAKER_FACTER_mongodb_repo_version: ${{ matrix.mongodb.value }}
70+
71+
tests:
72+
needs:
73+
- acceptance
74+
runs-on: ubuntu-latest
75+
name: Test suite
76+
steps:
77+
- run: echo Test suite completed
78+
# explicitly run at the root dir. In case people set working-directory this will otherwise fail (because this jobs doesn't clone the repo and the subdir doesn't exist)
79+
working-directory: '.'

0 commit comments

Comments
 (0)