forked from puppetlabs/puppetlabs-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (54 loc) · 1.56 KB
/
pr_test_ubuntu.yaml
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
name: "PR Test on Ubuntu Github Runners"
on: [pull_request]
jobs:
Acceptance:
strategy:
fail-fast: false
matrix:
platform:
- ubuntu-18.04
- ubuntu-20.04
- ubuntu-22.04
collection:
- puppet6-nightly
- puppet7-nightly
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout Source
uses: actions/checkout@v2
- name: Activate Ruby 2.7
uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7"
- name: Cache gems
uses: actions/cache@v2
with:
path: vendor/gems
key: ${{ runner.os }}-pr-${{ hashFiles('**/Gemfile') }}
restore-keys: |
${{ runner.os }}-pr-
${{ runner.os }}-
- name: Prepare inventory file
run: |
cat <<EOF >> spec/fixtures/litmus_inventory.yaml
---
version: 2
groups:
- name: local
targets:
- uri: litmus_localhost
config:
transport: local
- name: ssh_nodes
targets: []
- name: winrm_nodes
targets: []
EOF
- name: Install gems and puppet agent
run: |
bundle install
sudo -u root env "PATH=$PATH" bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]'
- name: Install module
run: bundle exec rake 'litmus:install_module'
- name: Run acceptance tests
run: sudo -u root env "PATH=$PATH" bundle exec rake 'litmus:acceptance:localhost'