Add bundler/gem_tasks so rake build exists for the release workflow #25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "ci" | ||
| on: | ||
| push: | ||
| branches: | ||
| - "main" | ||
| pull_request: | ||
| branches: | ||
| - "main" | ||
| workflow_dispatch: | ||
| env: | ||
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
| jobs: | ||
| spec: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| ruby_version: | ||
| - "3.2" | ||
| - "4.0" | ||
| include: | ||
| - ruby_version: "3.2" | ||
| puppet_gem_version: "~> 8.0" | ||
| - ruby_version: "4.0" | ||
| puppet_gem_version: "~> 9.0" | ||
| runs_on: | ||
| - "ubuntu-latest" | ||
| - "macos-latest" | ||
| - "ubuntu-24.04-arm" | ||
| # NOTE: windows-latest is a separate, bespoke job below, not part of this | ||
| # matrix -- see that job for why. | ||
| name: "spec (${{ matrix.runs_on }} ruby ${{ matrix.ruby_version }} | puppet ${{ matrix.puppet_gem_version }})" | ||
| uses: "puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@main" | ||
|
Check warning on line 35 in .github/workflows/ci.yml
|
||
| secrets: "inherit" | ||
| with: | ||
| rake_task: "spec" | ||
| ruby_version: ${{ matrix.ruby_version }} | ||
| puppet_gem_version: ${{ matrix.puppet_gem_version }} | ||
| runs_on: ${{ matrix.runs_on }} | ||
| spec-windows: | ||
| # windows-latest can't use the shared gem_ci.yml: that reusable workflow | ||
| # does its own checkout internally, with no hook to set the long-paths | ||
| # registry key before r10k's test fixtures get cloned into a deeply | ||
| # nested temp path. This repo's own fixtures (e.g. puppetlabs-cron_core's | ||
| # acceptance specs) are long enough that D:/a/puppetlabs-onceover/puppetlabs-onceover/... | ||
| # crosses Windows' 260-char MAX_PATH without it -- confirmed by | ||
| # reproduction, not assumed. | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| ruby_version: | ||
| - "3.2" | ||
| - "4.0" | ||
| include: | ||
| - ruby_version: "3.2" | ||
| puppet_gem_version: "~> 8.0" | ||
| - ruby_version: "4.0" | ||
| puppet_gem_version: "~> 9.0" | ||
| name: "spec (windows-latest ruby ${{ matrix.ruby_version }} | puppet ${{ matrix.puppet_gem_version }})" | ||
| runs-on: "windows-latest" | ||
| env: | ||
| PUPPET_GEM_VERSION: ${{ matrix.puppet_gem_version }} | ||
| PUPPET_FORGE_TOKEN: ${{ secrets.PUPPET_FORGE_TOKEN || secrets.PUPPET_FORGE_TOKEN_PUBLIC }} | ||
| BUNDLE_RUBYGEMS___PUPPETCORE__PUPPET__COM: "forge-key:${{ secrets.PUPPET_FORGE_TOKEN || secrets.PUPPET_FORGE_TOKEN_PUBLIC }}" | ||
| steps: | ||
| - uses: "actions/checkout@v4" | ||
| - uses: "ruby/setup-ruby@v1" | ||
| with: | ||
| ruby-version: ${{ matrix.ruby_version }} | ||
| bundler-cache: true | ||
| - name: "Enable Windows long paths" | ||
| run: | | ||
| Set-ItemProperty 'HKLM:\System\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -value 1 | ||
| git config --global core.longpaths true | ||
| - name: "rubocop" | ||
| run: bundle exec rubocop --format github | ||
| - name: "spec" | ||
| run: bundle exec rake spec | ||