Unverified Commit 8d8d8a0e authored by Tim Meusel's avatar Tim Meusel Committed by GitHub
Browse files

Merge pull request #330 from voxpupuli/modulesync

modulesync 5.2.0
parents 1cdc9ac2 9a203086
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ If you have Ruby 2.x or want a specific version of Puppet,
you must set an environment variable such as:

```sh
export PUPPET_VERSION="~> 5.5.6"
export PUPPET_GEM_VERSION="~> 6.1.0"
```

You can install all needed gems for spec tests into the modules directory by
@@ -232,17 +232,16 @@ simple tests against it after applying the module. You can run this
with:

```sh
BEAKER_setfile=debian10-x64 bundle exec rake beaker
BEAKER_setfile=debian11-64 bundle exec rake beaker
```

You can replace the string `debian10` with any common operating system.
The following strings are known to work:

* ubuntu1604
* ubuntu1804
* ubuntu2004
* debian9
* debian10
* debian11
* centos7
* centos8

+6 −78
Original line number Diff line number Diff line
@@ -7,84 +7,12 @@ name: CI
on: pull_request

concurrency:
  group: ${{ github.head_ref }}
  group: ${{ github.ref_name }}
  cancel-in-progress: true

jobs:
  setup_matrix:
    name: 'Setup Test Matrix'
    runs-on: ubuntu-latest
    timeout-minutes: 40
    outputs:
      puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }}
      github_action_test_matrix: ${{ steps.get-outputs.outputs.github_action_test_matrix }}
    env:
      BUNDLE_WITHOUT: development:system_tests:release
    steps:
      - uses: actions/checkout@v2
      - name: Setup ruby
        uses: ruby/setup-ruby@v1
  puppet:
    name: Puppet
    uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v1
    with:
          ruby-version: '3.0'
          bundler-cache: true
      - name: Run static validations
        run: bundle exec rake validate lint check
      - name: Run rake rubocop
        run: bundle exec rake rubocop
      - name: Setup Test Matrix
        id: get-outputs
        run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false

  unit:
    needs: setup_matrix
    runs-on: ubuntu-latest
    timeout-minutes: 40
    strategy:
      fail-fast: false
      matrix:
        include: ${{fromJson(needs.setup_matrix.outputs.puppet_unit_test_matrix)}}
    env:
      BUNDLE_WITHOUT: development:system_tests:release
      PUPPET_VERSION: "~> ${{ matrix.puppet }}.0"
    name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }})
    steps:
      - uses: actions/checkout@v2
      - name: Setup ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true
      - name: Run tests
        run: bundle exec rake parallel_spec

  acceptance:
    needs: setup_matrix
    runs-on: ubuntu-latest
    env:
      BUNDLE_WITHOUT: development:test:release
    strategy:
      fail-fast: false
      matrix:
        include: ${{fromJson(needs.setup_matrix.outputs.github_action_test_matrix)}}
    name: ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }}
    steps:
      - uses: actions/checkout@v2
      - name: Setup ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: '3.0'
          bundler-cache: true
      - name: Run tests
        run: bundle exec rake beaker
        env:
          BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet.collection }}
          BEAKER_setfile: ${{ matrix.setfile.value }}

  tests:
    needs:
      - unit
      - acceptance
    runs-on: ubuntu-latest
    name: Test suite
    steps:
      - run: echo Test suite completed
      pidfile_workaround: 'false'
+10 −22
Original line number Diff line number Diff line
@@ -9,26 +9,14 @@ on:
    tags:
      - '*'

env:
  BUNDLE_WITHOUT: development:test:system_tests

jobs:
  deploy:
    name: 'deploy to forge'
    runs-on: ubuntu-latest
    if: github.repository_owner == 'voxpupuli'
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2
      - name: Setup Ruby
        uses: ruby/setup-ruby@v1
  release:
    name: Release
    uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v1
    with:
          ruby-version: '2.7'
          bundler-cache: true
      - name: Build and Deploy
        env:
      allowed_owner: 'voxpupuli'
    secrets:
      # Configure secrets here:
          #  https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets
          BLACKSMITH_FORGE_USERNAME: '${{ secrets.PUPPET_FORGE_USERNAME }}'
          BLACKSMITH_FORGE_API_KEY: '${{ secrets.PUPPET_FORGE_API_KEY }}'
        run: bundle exec rake module:push
      #  https://docs.github.com/en/actions/security-guides/encrypted-secrets
      username: ${{ secrets.PUPPET_FORGE_USERNAME }}
      api_key: ${{ secrets.PUPPET_FORGE_API_KEY }}
+1 −1
Original line number Diff line number Diff line
@@ -2,4 +2,4 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

modulesync_config_version: '5.1.0'
modulesync_config_version: '5.2.0'
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ WORKDIR /opt/puppet
# https://github.com/puppetlabs/puppet/blob/06ad255754a38f22fb3a22c7c4f1e2ce453d01cb/lib/puppet/provider/service/runit.rb#L39
RUN mkdir -p /etc/sv

ARG PUPPET_VERSION="~> 6.0"
ARG PUPPET_GEM_VERSION="~> 6.0"
ARG PARALLEL_TEST_PROCESSORS=4

# Cache gems
Loading