root / .github / workflows / ci.yml @ 5fea281f
Historique | Voir | Annoter | Télécharger (2,48 ko)
1 | 5fea281f | Tim | ---
|
---|---|---|---|
2 | # Managed by modulesync - DO NOT EDIT
|
||
3 | # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
|
||
4 | |||
5 | 78f22811 | Steve Traylen | name: CI |
6 | |||
7 | on: pull_request |
||
8 | |||
9 | 5fea281f | Tim | concurrency:
|
10 | group: ${{ github.head_ref }} |
||
11 | cancel-in-progress: true |
||
12 | |||
13 | 78f22811 | Steve Traylen | jobs:
|
14 | setup_matrix:
|
||
15 | name: 'Setup Test Matrix' |
||
16 | runs-on: ubuntu-latest |
||
17 | 5fea281f | Tim | timeout-minutes: 40 |
18 | 78f22811 | Steve Traylen | outputs:
|
19 | puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }} |
||
20 | 5fea281f | Tim | github_action_test_matrix: ${{ steps.get-outputs.outputs.github_action_test_matrix }} |
21 | 78f22811 | Steve Traylen | env:
|
22 | 5fea281f | Tim | BUNDLE_WITHOUT: development:system_tests:release |
23 | 78f22811 | Steve Traylen | steps:
|
24 | - uses: actions/checkout@v2
|
||
25 | - name: Setup ruby
|
||
26 | uses: ruby/setup-ruby@v1 |
||
27 | with:
|
||
28 | 5fea281f | Tim | ruby-version: '3.0' |
29 | 78f22811 | Steve Traylen | bundler-cache: true |
30 | 5fea281f | Tim | - name: Run static validations
|
31 | run: bundle exec rake validate lint check |
||
32 | - name: Run rake rubocop
|
||
33 | da8956d3 | Steve Traylen | run: bundle exec rake rubocop |
34 | 78f22811 | Steve Traylen | - name: Setup Test Matrix
|
35 | id: get-outputs |
||
36 | run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false |
||
37 | |||
38 | unit:
|
||
39 | needs: setup_matrix |
||
40 | runs-on: ubuntu-latest |
||
41 | 5fea281f | Tim | timeout-minutes: 40 |
42 | 78f22811 | Steve Traylen | strategy:
|
43 | fail-fast: false |
||
44 | matrix:
|
||
45 | include: ${{fromJson(needs.setup_matrix.outputs.puppet_unit_test_matrix)}} |
||
46 | env:
|
||
47 | BUNDLE_WITHOUT: development:system_tests:release |
||
48 | PUPPET_VERSION: "~> ${{ matrix.puppet }}.0" |
||
49 | name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }}) |
||
50 | steps:
|
||
51 | - uses: actions/checkout@v2
|
||
52 | - name: Setup ruby
|
||
53 | uses: ruby/setup-ruby@v1 |
||
54 | with:
|
||
55 | ruby-version: ${{ matrix.ruby }} |
||
56 | bundler-cache: true |
||
57 | - name: Run tests
|
||
58 | 5fea281f | Tim | run: bundle exec rake parallel_spec |
59 | bd5145ab | Steve Traylen | |
60 | acceptance:
|
||
61 | needs: setup_matrix |
||
62 | runs-on: ubuntu-latest |
||
63 | env:
|
||
64 | BUNDLE_WITHOUT: development:test:release |
||
65 | strategy:
|
||
66 | fail-fast: false |
||
67 | matrix:
|
||
68 | 5fea281f | Tim | include: ${{fromJson(needs.setup_matrix.outputs.github_action_test_matrix)}} |
69 | bd5145ab | Steve Traylen | name: ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }} |
70 | steps:
|
||
71 | - uses: actions/checkout@v2
|
||
72 | - name: Setup ruby
|
||
73 | uses: ruby/setup-ruby@v1 |
||
74 | with:
|
||
75 | 5fea281f | Tim | ruby-version: '3.0' |
76 | bd5145ab | Steve Traylen | bundler-cache: true |
77 | - name: Run tests
|
||
78 | run: bundle exec rake beaker |
||
79 | env:
|
||
80 | BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet.collection }} |
||
81 | BEAKER_setfile: ${{ matrix.setfile.value }} |
||
82 | 5fea281f | Tim | |
83 | tests:
|
||
84 | needs:
|
||
85 | - unit
|
||
86 | - acceptance
|
||
87 | runs-on: ubuntu-latest |
||
88 | name: Test suite |
||
89 | steps:
|
||
90 | - run: echo Test suite completed |