root / .github / workflows / ci.yml @ 78f22811
Historique | Voir | Annoter | Télécharger (1,38 ko)
1 |
name: CI |
---|---|
2 |
|
3 |
on: pull_request |
4 |
|
5 |
jobs:
|
6 |
setup_matrix:
|
7 |
name: 'Setup Test Matrix' |
8 |
runs-on: ubuntu-latest |
9 |
outputs:
|
10 |
beaker_setfiles: ${{ steps.get-outputs.outputs.beaker_setfiles }} |
11 |
puppet_major_versions: ${{ steps.get-outputs.outputs.puppet_major_versions }} |
12 |
puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }} |
13 |
env:
|
14 |
BUNDLE_WITHOUT: development:test:release |
15 |
steps:
|
16 |
- uses: actions/checkout@v2
|
17 |
- name: Setup ruby
|
18 |
uses: ruby/setup-ruby@v1 |
19 |
with:
|
20 |
ruby-version: '2.7' |
21 |
bundler-cache: true |
22 |
- name: Run rake validate
|
23 |
run: bundle exec rake validate |
24 |
- name: Setup Test Matrix
|
25 |
id: get-outputs |
26 |
run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false |
27 |
|
28 |
unit:
|
29 |
needs: setup_matrix |
30 |
runs-on: ubuntu-latest |
31 |
strategy:
|
32 |
fail-fast: false |
33 |
matrix:
|
34 |
include: ${{fromJson(needs.setup_matrix.outputs.puppet_unit_test_matrix)}} |
35 |
env:
|
36 |
BUNDLE_WITHOUT: development:system_tests:release |
37 |
PUPPET_VERSION: "~> ${{ matrix.puppet }}.0" |
38 |
name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }}) |
39 |
steps:
|
40 |
- uses: actions/checkout@v2
|
41 |
- name: Setup ruby
|
42 |
uses: ruby/setup-ruby@v1 |
43 |
with:
|
44 |
ruby-version: ${{ matrix.ruby }} |
45 |
bundler-cache: true |
46 |
- name: Run tests
|
47 |
run: bundle exec rake |