Révision 5fea281f
modulesync 4.2.0
.github/workflows/ci.yml | ||
---|---|---|
1 |
--- |
|
2 |
# Managed by modulesync - DO NOT EDIT |
|
3 |
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ |
|
4 |
|
|
1 | 5 |
name: CI |
2 | 6 |
|
3 | 7 |
on: pull_request |
4 | 8 |
|
9 |
concurrency: |
|
10 |
group: ${{ github.head_ref }} |
|
11 |
cancel-in-progress: true |
|
12 |
|
|
5 | 13 |
jobs: |
6 | 14 |
setup_matrix: |
7 | 15 |
name: 'Setup Test Matrix' |
8 | 16 |
runs-on: ubuntu-latest |
17 |
timeout-minutes: 40 |
|
9 | 18 |
outputs: |
10 |
beaker_setfiles: ${{ steps.get-outputs.outputs.beaker_setfiles }} |
|
11 |
puppet_major_versions: ${{ steps.get-outputs.outputs.puppet_major_versions }} |
|
12 | 19 |
puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }} |
20 |
github_action_test_matrix: ${{ steps.get-outputs.outputs.github_action_test_matrix }} |
|
13 | 21 |
env: |
14 |
BUNDLE_WITHOUT: development:release |
|
22 |
BUNDLE_WITHOUT: development:system_tests:release
|
|
15 | 23 |
steps: |
16 | 24 |
- uses: actions/checkout@v2 |
17 | 25 |
- name: Setup ruby |
18 | 26 |
uses: ruby/setup-ruby@v1 |
19 | 27 |
with: |
20 |
ruby-version: '2.7'
|
|
28 |
ruby-version: '3.0'
|
|
21 | 29 |
bundler-cache: true |
22 |
- name: Run rake validate
|
|
23 |
run: bundle exec rake validate |
|
24 |
- name: Run rake rubocop https://github.com/voxpupuli/modulesync_config/pull/690
|
|
30 |
- name: Run static validations
|
|
31 |
run: bundle exec rake validate lint check
|
|
32 |
- name: Run rake rubocop |
|
25 | 33 |
run: bundle exec rake rubocop |
26 | 34 |
- name: Setup Test Matrix |
27 | 35 |
id: get-outputs |
... | ... | |
30 | 38 |
unit: |
31 | 39 |
needs: setup_matrix |
32 | 40 |
runs-on: ubuntu-latest |
41 |
timeout-minutes: 40 |
|
33 | 42 |
strategy: |
34 | 43 |
fail-fast: false |
35 | 44 |
matrix: |
... | ... | |
46 | 55 |
ruby-version: ${{ matrix.ruby }} |
47 | 56 |
bundler-cache: true |
48 | 57 |
- name: Run tests |
49 |
run: bundle exec rake |
|
58 |
run: bundle exec rake parallel_spec
|
|
50 | 59 |
|
51 | 60 |
acceptance: |
52 | 61 |
needs: setup_matrix |
... | ... | |
56 | 65 |
strategy: |
57 | 66 |
fail-fast: false |
58 | 67 |
matrix: |
59 |
setfile: ${{fromJson(needs.setup_matrix.outputs.beaker_setfiles)}} |
|
60 |
puppet: ${{fromJson(needs.setup_matrix.outputs.puppet_major_versions)}} |
|
68 |
include: ${{fromJson(needs.setup_matrix.outputs.github_action_test_matrix)}} |
|
61 | 69 |
name: ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }} |
62 | 70 |
steps: |
63 |
- name: Enable IPv6 on docker |
|
64 |
run: | |
|
65 |
echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json |
|
66 |
sudo service docker restart |
|
67 | 71 |
- uses: actions/checkout@v2 |
68 | 72 |
- name: Setup ruby |
69 | 73 |
uses: ruby/setup-ruby@v1 |
70 | 74 |
with: |
71 |
ruby-version: '2.7'
|
|
75 |
ruby-version: '3.0'
|
|
72 | 76 |
bundler-cache: true |
73 | 77 |
- name: Run tests |
74 | 78 |
run: bundle exec rake beaker |
75 | 79 |
env: |
76 | 80 |
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet.collection }} |
77 | 81 |
BEAKER_setfile: ${{ matrix.setfile.value }} |
82 |
|
|
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 |
Formats disponibles : Unified diff