-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathunit_tests_with_released_puppet_gem.yaml
More file actions
53 lines (46 loc) · 1.56 KB
/
unit_tests_with_released_puppet_gem.yaml
File metadata and controls
53 lines (46 loc) · 1.56 KB
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
---
name: Unit Tests with released Puppet gem
on:
workflow_call:
secrets:
PUPPET_FORGE_TOKEN_PUBLIC:
required: true
jobs:
unit_tests_with_released_puppet_gem:
name: Puppet${{ matrix.puppet_version }} gem on Ruby ${{ matrix.ruby }} on ${{ matrix.os_type }}
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-2022']
puppet_version: ['7', '8']
include:
- puppet_version: '7'
ruby: '2.7'
puppet_forge_token: ''
- puppet_version: '8'
ruby: '3.1'
puppet_forge_token: 'YES'
- os: 'ubuntu-latest'
os_type: 'Linux'
- os: 'macos-latest'
os_type: 'macOS'
- os: 'windows-2022'
os_type: 'Windows'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current PR code
uses: actions/checkout@v4
- name: Add libcurl for ruby 2.7 on ubuntu
if: ${{ matrix.puppet_version == '7' && matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt install libcurl4-openssl-dev
- name: Install ruby version ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
env:
BUNDLE_RUBYGEMS___PUPPETCORE__PUPPET__COM: forge-key:${{ matrix.puppet_version != '7' && secrets.PUPPET_FORGE_TOKEN_PUBLIC || '' }}
PUPPET_FORGE_TOKEN: ${{ matrix.puppet_forge_token }}
- name: Run unit tests
run: bundle exec rake parallel_spec