7
7
workflow_dispatch :
8
8
9
9
jobs :
10
- Spec :
11
- uses : " puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main"
12
- with :
13
- runs_on : " ubuntu-20.04"
14
- secrets : " inherit"
10
+ # Spec:
11
+ # uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main"
12
+ # with:
13
+ # runs_on: "ubuntu-20.04"
14
+ # secrets: "inherit"
15
15
16
+ # Acceptance:
17
+ # # needs: Spec
18
+ # runs-on: ubuntu-20.04
16
19
Acceptance :
17
- needs : Spec
18
- uses : " puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main"
19
- with :
20
- runs_on : " ubuntu-20.04"
21
- secrets : " inherit"
20
+ name : " Acceptance tests (centos:8 puppet7)"
21
+ runs-on : ubuntu-20.04
22
+
23
+ env :
24
+ PUPPET_GEM_VERSION : ' ~> 7.24'
25
+ FACTER_GEM_VERSION : ' https://github.com/puppetlabs/facter#main' # why is this set?
26
+
27
+ steps :
28
+
29
+ - name : " Checkout"
30
+ uses : " actions/checkout@v3"
31
+
32
+ - name : " Setup ruby"
33
+ uses : " ruby/setup-ruby@v1"
34
+ with :
35
+ ruby-version : " 2.7"
36
+ bundler-cache : true
37
+
38
+ - name : " Bundle environment"
39
+ run : |
40
+ echo ::group::bundler environment
41
+ bundle env
42
+ echo ::endgroup::
43
+
44
+ - name : " Provision environment"
45
+ run : |
46
+ bundle exec rake "litmus:provision[docker,litmusimage/centos:8]"
47
+ # Redact password
48
+ FILE='spec/fixtures/litmus_inventory.yaml'
49
+ sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true
50
+
51
+ - name : " Install Puppet agent"
52
+ run : |
53
+ bundle exec rake 'litmus:install_agent[puppet7]'
54
+
55
+ - name : " Install module"
56
+ run : |
57
+ bundle exec rake 'litmus:install_module'
58
+
59
+ - name : " Run acceptance tests"
60
+ run : |
61
+ bundle exec rake 'litmus:acceptance:parallel'
62
+
63
+ - name : " Remove test environment"
64
+ if : ${{ always() }}
65
+ continue-on-error : true
66
+ run : |
67
+ if [[ -f spec/fixtures/litmus_inventory.yaml ]]; then
68
+ bundle exec rake 'litmus:tear_down'
69
+ fi
0 commit comments