File: rspec_tests.yaml

package info (click to toggle)
ruby-puppet-resource-api 1.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,232 kB
  • sloc: ruby: 9,573; sh: 4; makefile: 2
file content (68 lines) | stat: -rw-r--r-- 2,381 bytes parent folder | download
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
name: RSpec tests

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

permissions:
  contents: read

jobs:
  linux_tests:
    name: Linux, Puppet ${{ matrix.cfg.puppet_version }}, Ruby ${{ matrix.cfg.ruby }}
    runs-on: ubuntu-latest
    strategy:
      matrix:
        cfg:
          - {puppet_version: '7', ruby: '2.7'}
          - {puppet_version: '7', ruby: 'jruby-9.3.7.0'}
          - {puppet_version: '8', ruby: '3.2'}
          - {puppet_version: '8', ruby: 'jruby-9.4.2.0'}
    env:
      PUPPET_GEM_VERSION: ~> ${{ matrix.cfg.puppet_version }}
    steps:
      - name: Checkout current PR
        uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Install Ruby version ${{ matrix.cfg.ruby }}
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.cfg.ruby }}
      - name: Update rubygems and install gems
        run: |
          bundle config set without development
          bundle install --jobs 4 --retry 3
      - run: bundle exec rake

  # Starting with version 3.2, Ruby no longer bundles libffi, which is necessary for tests on Windows. Due to a discrepancy between the C
  # library the Windows Puppet gem is built against and what GitHub runners use (MinGW and ucrt, respectively) we can't install the
  # Windows-specific Puppet gem that includes libffi. To work around these issues, we have a separate "integration" group that we include
  # when testing Puppet 8 / Ruby 3.2 on Windows. See PA-5406 for more.
  windows_tests:
    name: Windows, Puppet ${{ matrix.cfg.puppet_version }}, Ruby ${{ matrix.cfg.ruby }}
    runs-on: windows-latest
    strategy:
      matrix:
        cfg:
          - {puppet_version: '7', ruby: '2.7'}
          - {puppet_version: '8', ruby: '3.2', extra: 'bundle config set with integration'}
    env:
      PUPPET_GEM_VERSION: ~> ${{ matrix.cfg.puppet_version }}
    steps:
      - name: Checkout current PR
        uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Install Ruby version ${{ matrix.cfg.ruby }}
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.cfg.ruby }}
      - name: Update rubygems and install gems
        run: |
          bundle config set without development
          ${{ matrix.cfg.extra }}
          bundle install --jobs 4 --retry 3
      - run: bundle exec rake