-
Notifications
You must be signed in to change notification settings - Fork 136
69 lines (64 loc) · 1.82 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
name: Test
on:
pull_request:
push:
branches:
- 'develop'
- '*-stable'
concurrency:
group: ${{ github.ref_name }}
cancel-in-progress: true
jobs:
rubocop:
name: Rubocop
uses: theforeman/actions/.github/workflows/rubocop.yml@v0
test:
name: "Ruby ${{ matrix.ruby }} / Puppet ${{ matrix.puppet }}"
needs: rubocop
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- ruby: '2.7'
puppet: '7.0'
- ruby: '3.0'
puppet: '7.0'
- ruby: '3.2'
puppet: '8.0'
env:
PUPPET_VERSION: ${{ matrix.puppet }}
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: sudo apt-get install -y --no-install-recommends asciidoc
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Archive Gemfile.lock
uses: actions/upload-artifact@v4
with:
name: Gemfile-ruby-${{ matrix.ruby }}-puppet-${{ matrix.puppet }}.lock
path: Gemfile.lock
- name: Run tests
run: bundle exec rake spec
- name: Test installer configuration
run: |
bundle exec rake install PREFIX=./local --trace
bundle exec rake installation_tests PREFIX=./local --trace
- name: Archive Puppetfile.lock
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: Puppetfile-ruby-${{ matrix.ruby }}-puppet-${{ matrix.puppet }}.lock
path: Puppetfile.lock
# A dummy job that you can mark as a required check instead of each individual test
test-suite:
needs: test
runs-on: ubuntu-latest
name: Test suite
steps:
- run: echo Test suite completed