diff --git a/.github/workflows/acceptance.yml b/.github/workflows/acceptance.yml index d261b34..7562c5b 100644 --- a/.github/workflows/acceptance.yml +++ b/.github/workflows/acceptance.yml @@ -1,74 +1,77 @@ name: Acceptance tests on: pull_request jobs: build_cache: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Setup ruby uses: actions/setup-ruby@v1 with: ruby-version: "2.7" - uses: actions/cache@v2 with: path: vendor/bundle key: ${{ runner.os }}-2.7-gems-acceptance-${{ hashFiles('**/Gemfile.lock') }} restore-keys: | ${{ runner.os }}-2.7-gems-acceptance- - name: Install dependencies run: | gem install bundler bundle config path vendor/bundle bundle config without 'development test' bundle install --jobs 4 --retry 3 + acceptance: needs: build_cache runs-on: ubuntu-latest strategy: fail-fast: false matrix: setfile: - centos6-64{hostname=centos6-64.example.com} + - centos7-64{hostname=centos7-64.example.com,image=centos:7.6.1810} + - fedora31-64{hostname=fedora31-64.example.com} - debian9-64{hostname=debian9-64.example.com} - debian10-64{hostname=debian10-64.example.com} - - fedora31-64{hostname=fedora31-64.example.com} + - ubuntu1604-64{hostname=ubuntu1604-64.example.com,image=ubuntu:xenial-20191212} - ubuntu1804-64{hostname=ubuntu1804-64.example.com} - ubuntu2004-64{hostname=ubuntu2004-64.example.com} puppet: - "6" - "5" exclude: - setfile: debian10-64{hostname=debian10-64.example.com} puppet: "5" - setfile: ubuntu2004-64{hostname=ubuntu2004-64.example.com} puppet: "5" name: Puppet ${{ matrix.puppet }} - ${{ matrix.setfile }} steps: - name: Enable IPv6 on docker run: | echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json sudo service docker restart - uses: actions/checkout@v2 - name: Setup ruby uses: actions/setup-ruby@v1 with: ruby-version: "2.7" - uses: actions/cache@v2 with: path: vendor/bundle key: ${{ runner.os }}-2.7-gems-acceptance-${{ hashFiles('**/Gemfile.lock') }} restore-keys: | ${{ runner.os }}-2.7-gems-acceptance- - name: Install dependencies run: | gem install bundler bundle config path vendor/bundle bundle config without 'development test' bundle install --jobs 4 --retry 3 - name: Run tests run: bundle exec rake beaker env: BEAKER_PUPPET_COLLECTION: puppet${{ matrix.puppet }} BEAKER_setfile: ${{ matrix.setfile }} diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index bd43a62..b9270ae 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -1,114 +1,126 @@ name: Nightly tests on: schedule: - cron: '4 * * * *' jobs: unit: if: github.repository == 'theforeman/puppet-puppet' runs-on: ubuntu-latest strategy: fail-fast: false matrix: ruby: - "2.5" - "2.4" puppet: - "6" - "5" exclude: - ruby: "2.5" puppet: "5" - ruby: "2.4" puppet: "6" env: PUPPET_VERSION: "${{ matrix.puppet }}.0" name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }}) steps: - uses: actions/checkout@v2 - name: Setup ruby uses: actions/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - uses: actions/cache@v2 with: path: vendor/bundle key: ${{ runner.os }}-${{ matrix.puppet }}-${{ matrix.ruby }}-gems-unit-${{ hashFiles('**/Gemfile.lock') }} restore-keys: | ${{ runner.os }}-${{ matrix.puppet }}-${{ matrix.ruby }}-gems-unit- - name: Install dependencies run: | gem install bundler bundle config path vendor/bundle bundle config without 'development system_tests' bundle install --jobs 4 --retry 3 - name: Run tests run: bundle exec rake build_cache: if: github.repository == 'theforeman/puppet-puppet' runs-on: ubuntu-latest steps: - name: Enable IPv6 on docker run: | echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json sudo service docker restart - uses: actions/checkout@v2 - name: Setup ruby uses: actions/setup-ruby@v1 with: ruby-version: "2.7" - uses: actions/cache@v2 with: path: vendor/bundle key: ${{ runner.os }}-2.7-gems-acceptance-${{ hashFiles('**/Gemfile.lock') }} restore-keys: | ${{ runner.os }}-2.7-gems-acceptance- - name: Install dependencies run: | gem install bundler bundle config path vendor/bundle bundle config without 'development test' bundle install --jobs 4 --retry 3 + acceptance: if: github.repository == 'theforeman/puppet-puppet' needs: build_cache runs-on: ubuntu-latest strategy: fail-fast: false matrix: setfile: - - centos7-64{hostname=centos7-64.example.com} - - centos8-64{hostname=centos8-64.example.com} + - centos6-64{hostname=centos6-64.example.com} + - centos7-64{hostname=centos7-64.example.com,image=centos:7.6.1810} + - fedora31-64{hostname=fedora31-64.example.com} + - debian9-64{hostname=debian9-64.example.com} + - debian10-64{hostname=debian10-64.example.com} + - ubuntu1604-64{hostname=ubuntu1604-64.example.com,image=ubuntu:xenial-20191212} + - ubuntu1804-64{hostname=ubuntu1804-64.example.com} + - ubuntu2004-64{hostname=ubuntu2004-64.example.com} puppet: - "6" - "5" + exclude: + - setfile: debian10-64{hostname=debian10-64.example.com} + puppet: "5" + - setfile: ubuntu2004-64{hostname=ubuntu2004-64.example.com} + puppet: "5" name: Puppet ${{ matrix.puppet }} - ${{ matrix.setfile }} steps: - name: Enable IPv6 on docker run: | echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json sudo service docker restart - uses: actions/checkout@v2 - name: Setup ruby uses: actions/setup-ruby@v1 with: ruby-version: "2.7" - uses: actions/cache@v2 with: path: vendor/bundle key: ${{ runner.os }}-2.7-gems-acceptance-${{ hashFiles('**/Gemfile.lock') }} restore-keys: | ${{ runner.os }}-2.7-gems-acceptance- - name: Install dependencies run: | gem install bundler bundle config path vendor/bundle bundle config without 'development test' bundle install --jobs 4 --retry 3 - name: Run tests run: bundle exec rake beaker env: BEAKER_PUPPET_COLLECTION: puppet${{ matrix.puppet }} BEAKER_setfile: ${{ matrix.setfile }} diff --git a/.sync.yml b/.sync.yml index c51263f..11601d4 100644 --- a/.sync.yml +++ b/.sync.yml @@ -1,18 +1,8 @@ --- -.travis.yml: - beaker_sets: - - centos6-64 - - debian9-64 - - debian10-64 - - fedora31-64 - - ubuntu1804-64 - - ubuntu2004-64 - env: - global: - - PARALLEL_TEST_PROCESSORS=8 - beaker_puppet_collections: - - puppet5 - - puppet6 +.github/workflows/acceptance.yml: + pidfile_workaround: true +.github/workflows/cron.yml: + pidfile_workaround: true Gemfile: extra: - gem: hocon diff --git a/Gemfile b/Gemfile index 0d94af0..2497079 100644 --- a/Gemfile +++ b/Gemfile @@ -1,21 +1,22 @@ # This file is managed centrally by modulesync # https://github.com/theforeman/foreman-installer-modulesync source 'https://rubygems.org' -gem 'puppet', ENV.key?('PUPPET_VERSION') ? "~> #{ENV['PUPPET_VERSION']}" : '>= 5.5' +gem 'puppet', ENV.key?('PUPPET_VERSION') ? "~> #{ENV['PUPPET_VERSION']}" : '>= 5.5', groups: ['development', 'test'] +gem 'rake' -gem 'kafo_module_lint' -gem 'puppet-lint-empty_string-check' -gem 'puppet-lint-file_ensure-check' -gem 'puppet-lint-param-docs', '>= 1.3.0' -gem 'puppet-lint-spaceship_operator_without_tag-check' -gem 'puppet-lint-strict_indent-check' -gem 'puppet-lint-undef_in_function-check' +gem 'kafo_module_lint', {"groups"=>["test"]} +gem 'puppet-lint-empty_string-check', {"groups"=>["test"]} +gem 'puppet-lint-file_ensure-check', {"groups"=>["test"]} +gem 'puppet-lint-param-docs', '>= 1.3.0', {"groups"=>["test"]} +gem 'puppet-lint-spaceship_operator_without_tag-check', {"groups"=>["test"]} +gem 'puppet-lint-strict_indent-check', {"groups"=>["test"]} +gem 'puppet-lint-undef_in_function-check', {"groups"=>["test"]} gem 'voxpupuli-test', '~> 1.4' gem 'github_changelog_generator', '>= 1.15.0', {"groups"=>["development"]} gem 'puppet-blacksmith', '>= 6.0.0', {"groups"=>["development"]} gem 'voxpupuli-acceptance', '~> 0.2', {"groups"=>["system_tests"]} gem 'hocon' # vim:ft=ruby