|
9 | 9 | jobs: |
10 | 10 | Spec: |
11 | 11 | uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main" |
12 | | - with: |
13 | | - runs_on: "ubuntu-24.04" |
14 | 12 | secrets: "inherit" |
15 | 13 |
|
16 | | - setup_matrix: |
17 | | - name: "Setup Test Matrix" |
18 | | - needs: "Spec" |
19 | | - runs-on: ubuntu-24.04 |
20 | | - outputs: |
21 | | - matrix: ${{ steps.get-matrix.outputs.matrix }} |
22 | | - |
23 | | - steps: |
24 | | - - name: Checkout Source |
25 | | - uses: actions/checkout@v3 |
26 | | - |
27 | | - - name: Activate Ruby 3.1 |
28 | | - uses: ruby/setup-ruby@v1 |
29 | | - with: |
30 | | - ruby-version: "3.1" |
31 | | - bundler-cache: true |
32 | | - |
33 | | - - name: Print bundle environment |
34 | | - run: | |
35 | | - echo ::group::bundler environment |
36 | | - bundle env |
37 | | - echo ::endgroup:: |
38 | | -
|
39 | | - - name: Setup Acceptance Test Matrix |
40 | | - id: get-matrix |
41 | | - run: | |
42 | | - bundle exec matrix_from_metadata_v2 --exclude-platforms '["Debian-12-arm", "Ubuntu-22.04-arm", "RedHat-9-arm"]' |
43 | | -
|
44 | 14 | Acceptance: |
45 | | - name: "${{matrix.platforms.label}}, ${{matrix.collection}}" |
46 | | - needs: |
47 | | - - setup_matrix |
48 | | - if: ${{ needs.setup_matrix.outputs.matrix != '{}' }} |
49 | | - |
50 | | - runs-on: ubuntu-24.04 |
51 | | - strategy: |
52 | | - fail-fast: false |
53 | | - matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}} |
54 | | - |
55 | | - env: |
56 | | - PUPPET_GEM_VERSION: '~> 7.24' |
57 | | - FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main' |
58 | | - |
59 | | - steps: |
60 | | - - name: "Install Twingate" |
61 | | - uses: "twingate/github-action@v1" |
62 | | - with: |
63 | | - service-key: ${{ secrets.TWINGATE_PUBLIC_REPO_KEY }} |
64 | | - |
65 | | - - name: Checkout Source |
66 | | - uses: actions/checkout@v3 |
67 | | - |
68 | | - - name: Activate Ruby 3.1 |
69 | | - uses: ruby/setup-ruby@v1 |
70 | | - with: |
71 | | - ruby-version: "3.1" |
72 | | - bundler-cache: true |
73 | | - |
74 | | - - name: Print bundle environment |
75 | | - run: | |
76 | | - bundle env |
77 | | -
|
78 | | - - name: "Disable mysqld apparmor profile" |
79 | | - if: ${{matrix.platforms.provider == 'docker'}} |
80 | | - run: | |
81 | | - sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ |
82 | | - sudo apparmor_parser -R /etc/apparmor.d/disable/usr.sbin.mysqld |
83 | | - sudo systemctl disable apparmor |
84 | | - sudo systemctl stop apparmor |
85 | | -
|
86 | | - - name: Provision test environment |
87 | | - run: | |
88 | | - bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]' |
89 | | - FILE='spec/fixtures/litmus_inventory.yaml' |
90 | | - sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true |
91 | | -
|
92 | | - - name: Install agent |
93 | | - run: | |
94 | | - bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]' |
95 | | -
|
96 | | - - name: Install module |
97 | | - run: | |
98 | | - bundle exec rake 'litmus:install_module' |
99 | | -
|
100 | | - - name: Run acceptance tests |
101 | | - run: | |
102 | | - bundle exec rake 'litmus:acceptance:parallel' |
103 | | -
|
104 | | - - name: Remove test environment |
105 | | - if: ${{ always() }} |
106 | | - continue-on-error: true |
107 | | - run: | |
108 | | - bundle exec rake 'litmus:tear_down' |
| 15 | + needs: Spec |
| 16 | + uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main" |
| 17 | + with: |
| 18 | + flags: "--latest-agent" |
| 19 | + secrets: "inherit" |
0 commit comments