|
4 | 4 |
|
5 | 5 | name: CI
|
6 | 6 |
|
7 |
| -on: pull_request |
| 7 | +on: |
| 8 | + pull_request: {} |
| 9 | + push: |
| 10 | + branches: |
| 11 | + - main |
| 12 | + - master |
8 | 13 |
|
9 |
| -jobs: |
10 |
| - setup_matrix: |
11 |
| - name: 'Setup Test Matrix' |
12 |
| - runs-on: ubuntu-latest |
13 |
| - timeout-minutes: 40 |
14 |
| - outputs: |
15 |
| - beaker_setfiles: ${{ steps.get-outputs.outputs.beaker_setfiles }} |
16 |
| - puppet_major_versions: ${{ steps.get-outputs.outputs.puppet_major_versions }} |
17 |
| - puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }} |
18 |
| - env: |
19 |
| - BUNDLE_WITHOUT: development:system_tests:release |
20 |
| - steps: |
21 |
| - - uses: actions/checkout@v2 |
22 |
| - - name: Setup ruby |
23 |
| - uses: ruby/setup-ruby@v1 |
24 |
| - with: |
25 |
| - ruby-version: '3.0' |
26 |
| - bundler-cache: true |
27 |
| - - name: Run static validations |
28 |
| - run: bundle exec rake validate lint check |
29 |
| - - name: Run rake rubocop |
30 |
| - run: bundle exec rake rubocop |
31 |
| - - name: Setup Test Matrix |
32 |
| - id: get-outputs |
33 |
| - run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false |
34 |
| - |
35 |
| - unit: |
36 |
| - needs: setup_matrix |
37 |
| - runs-on: ubuntu-latest |
38 |
| - timeout-minutes: 40 |
39 |
| - strategy: |
40 |
| - fail-fast: false |
41 |
| - matrix: |
42 |
| - include: ${{fromJson(needs.setup_matrix.outputs.puppet_unit_test_matrix)}} |
43 |
| - env: |
44 |
| - BUNDLE_WITHOUT: development:system_tests:release |
45 |
| - PUPPET_VERSION: "~> ${{ matrix.puppet }}.0" |
46 |
| - name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }}) |
47 |
| - steps: |
48 |
| - - uses: actions/checkout@v2 |
49 |
| - - name: Setup ruby |
50 |
| - uses: ruby/setup-ruby@v1 |
51 |
| - with: |
52 |
| - ruby-version: ${{ matrix.ruby }} |
53 |
| - bundler-cache: true |
54 |
| - - name: Run tests |
55 |
| - run: bundle exec rake parallel_spec |
| 14 | +concurrency: |
| 15 | + group: ${{ github.ref_name }} |
| 16 | + cancel-in-progress: true |
56 | 17 |
|
57 |
| - acceptance: |
58 |
| - needs: setup_matrix |
59 |
| - runs-on: ubuntu-latest |
60 |
| - env: |
61 |
| - BUNDLE_WITHOUT: development:test:release |
62 |
| - strategy: |
63 |
| - fail-fast: false |
64 |
| - matrix: |
65 |
| - setfile: ${{fromJson(needs.setup_matrix.outputs.beaker_setfiles)}} |
66 |
| - puppet: ${{fromJson(needs.setup_matrix.outputs.puppet_major_versions)}} |
67 |
| - name: ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }} |
68 |
| - steps: |
69 |
| - - uses: actions/checkout@v2 |
70 |
| - - name: Setup ruby |
71 |
| - uses: ruby/setup-ruby@v1 |
72 |
| - with: |
73 |
| - ruby-version: '3.0' |
74 |
| - bundler-cache: true |
75 |
| - - name: Run tests |
76 |
| - run: bundle exec rake beaker |
77 |
| - env: |
78 |
| - BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet.collection }} |
79 |
| - BEAKER_setfile: ${{ matrix.setfile.value }} |
| 18 | +jobs: |
| 19 | + puppet: |
| 20 | + name: Puppet |
| 21 | + uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v2 |
| 22 | + with: |
| 23 | + pidfile_workaround: 'false' |
0 commit comments