diff --git a/.github/workflows/daily_unit_tests_with_nightly_puppet_gem.yaml b/.github/workflows/daily_unit_tests_with_nightly_puppet_gem.yaml index 16d4500..5bd0f50 100644 --- a/.github/workflows/daily_unit_tests_with_nightly_puppet_gem.yaml +++ b/.github/workflows/daily_unit_tests_with_nightly_puppet_gem.yaml @@ -1,69 +1,70 @@ --- name: '[Daily] Unit Tests with nightly Puppet gem' on: schedule: - cron: '0 5 * * 1-5' jobs: daily_unit_tests_with_nightly_puppet_gem: - name: ${{ matrix.os_type }} / Puppet${{ matrix.puppet_version }} gem / Ruby ${{ matrix.ruby }} + name: ${{ matrix.os_type }} / Puppet${{ matrix.puppet_version }} gem / Ruby ${{ matrix.ruby }} strategy: matrix: os: [ 'ubuntu-18.04', 'macos-10.15', 'windows-2016' ] puppet_version: [ 5, 6, 7 ] include: - puppet_version: 5 ruby: 2.4 - puppet_version: 6 ruby: 2.5 - puppet_version: 7 ruby: 2.7 - os: 'ubuntu-18.04' os_type: 'Linux' env_set_cmd: 'export ' gem_file: 'puppet-latest.gem' - os: 'macos-10.15' os_type: 'macOS' env_set_cmd: 'export ' gem_file: 'puppet-latest-universal-darwin.gem' - os: 'windows-2016' os_type: 'Windows' env_set_cmd: '$env:' gem_file: 'puppet-latest-x64-mingw32.gem' runs-on: ${{ matrix.os }} steps: - name: Checkout code uses: actions/checkout@v2 - name: Install ruby version ${{ matrix.ruby }} uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - name: Install the latest nightly build of puppet${{ matrix.puppet_version }} gem run: | curl http://nightlies.puppet.com/downloads/gems/puppet${{ matrix.puppet_version }}-nightly/${{ matrix.gem_file }} --output puppet.gem gem install puppet.gem -N - name: Prepare testing environment with bundler run: | + git config --global core.longpaths true bundle config set system 'true' ${{ matrix.env_set_cmd }}PUPPET_GEM_VERSION=$(ruby -e 'puts /puppet\s+\((.+)\)/.match(`gem list -eld puppet`)[1]') bundle update --jobs 4 --retry 3 - name: Run unit tests run: bundle exec rake parallel_spec notify-via-slack: name: Notify workflow conclusion via Slack if: ${{ always() }} needs: daily_unit_tests_with_nightly_puppet_gem runs-on: 'ubuntu-latest' steps: - uses: luchihoratiu/notify-via-slack@main with: SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/static_code_analysis.yaml b/.github/workflows/static_code_analysis.yaml index 9b94bf8..0a1f427 100644 --- a/.github/workflows/static_code_analysis.yaml +++ b/.github/workflows/static_code_analysis.yaml @@ -1,46 +1,48 @@ --- name: Static Code Analysis on: push: branches: [ main ] pull_request: branches: [ main ] jobs: static_code_analysis: name: Run checks env: ruby_version: 2.5 extra_checks: check:symlinks check:git_ignore check:dot_underscore check:test_file runs-on: 'ubuntu-18.04' steps: - name: Checkout current PR code uses: actions/checkout@v2 with: fetch-depth: 0 - name: Install ruby version ${{ env.ruby_version }} uses: ruby/setup-ruby@v1 with: ruby-version: ${{ env.ruby_version }} - name: Prepare testing environment with bundler - run: bundle update --jobs 4 --retry 3 + run: | + git config --global core.longpaths true + bundle update --jobs 4 --retry 3 - name: Run commits check run: bundle exec rake commits - name: Run rubocop check run: bundle exec rake ${{ env.extra_checks }} rubocop - name: Run syntax check run: bundle exec rake ${{ env.extra_checks }} syntax syntax:hiera syntax:manifests syntax:templates - name: Run lint check run: bundle exec rake ${{ env.extra_checks }} lint - name: Run metadata_lint check run: bundle exec rake ${{ env.extra_checks }} metadata_lint diff --git a/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml b/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml index b408ee8..0b1afc0 100644 --- a/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml +++ b/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml @@ -1,60 +1,61 @@ --- name: Unit Tests with nightly Puppet gem on: push: branches: [ main ] pull_request: branches: [ main ] jobs: unit_tests_with_nightly_puppet_gem: name: ${{ matrix.os_type }} / Puppet${{ matrix.puppet_version }} gem / Ruby ${{ matrix.ruby }} strategy: matrix: os: [ 'ubuntu-18.04', 'macos-10.15', 'windows-2016' ] puppet_version: [ 5, 6, 7 ] include: - puppet_version: 5 ruby: 2.4 - puppet_version: 6 ruby: 2.5 - puppet_version: 7 ruby: 2.7 - os: 'ubuntu-18.04' os_type: 'Linux' env_set_cmd: 'export ' gem_file: 'puppet-latest.gem' - os: 'macos-10.15' os_type: 'macOS' env_set_cmd: 'export ' gem_file: 'puppet-latest-universal-darwin.gem' - os: 'windows-2016' os_type: 'Windows' env_set_cmd: '$env:' gem_file: 'puppet-latest-x64-mingw32.gem' runs-on: ${{ matrix.os }} steps: - name: Checkout current PR code uses: actions/checkout@v2 - name: Install ruby version ${{ matrix.ruby }} uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - name: Install the latest nightly build of puppet${{ matrix.puppet_version }} gem run: | curl http://nightlies.puppet.com/downloads/gems/puppet${{ matrix.puppet_version }}-nightly/${{ matrix.gem_file }} --output puppet.gem gem install puppet.gem -N - name: Prepare testing environment with bundler run: | + git config --global core.longpaths true bundle config set system 'true' ${{ matrix.env_set_cmd }}PUPPET_GEM_VERSION=$(ruby -e 'puts /puppet\s+\((.+)\)/.match(`gem list -eld puppet`)[1]') bundle update --jobs 4 --retry 3 - name: Run unit tests run: bundle exec rake parallel_spec diff --git a/.github/workflows/unit_tests_with_released_puppet_gem.yaml b/.github/workflows/unit_tests_with_released_puppet_gem.yaml index 47385ac..11ddefe 100644 --- a/.github/workflows/unit_tests_with_released_puppet_gem.yaml +++ b/.github/workflows/unit_tests_with_released_puppet_gem.yaml @@ -1,48 +1,49 @@ --- name: Unit Tests with released Puppet gem on: push: branches: [ main ] pull_request: branches: [ main ] jobs: unit_tests_with_released_puppet_gem: - name: ${{ matrix.os_type }} / Puppet${{ matrix.puppet_version }} gem / Ruby ${{ matrix.ruby }} + name: ${{ matrix.os_type }} / Puppet${{ matrix.puppet_version }} gem / Ruby ${{ matrix.ruby }} strategy: matrix: os: [ 'ubuntu-18.04', 'macos-10.15', 'windows-2016' ] puppet_version: [ 5, 6 ] include: - puppet_version: 5 ruby: 2.4 - puppet_version: 6 ruby: 2.5 - os: 'ubuntu-18.04' os_type: 'Linux' - os: 'macos-10.15' os_type: 'macOS' - os: 'windows-2016' os_type: 'Windows' runs-on: ${{ matrix.os }} env: PUPPET_GEM_VERSION: ~> ${{ matrix.puppet_version }}.0 steps: - name: Checkout current PR code uses: actions/checkout@v2 - name: Install ruby version ${{ matrix.ruby }} uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - name: Prepare testing environment with bundler run: | + git config --global core.longpaths true bundle config set system 'true' bundle update --jobs 4 --retry 3 - name: Run unit tests run: bundle exec rake parallel_spec