Add RELEASING.md documentation #31
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 | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.2' | |
| bundler-cache: true | |
| - name: Install dependencies | |
| run: bundle install | |
| - name: Run puppet-lint | |
| run: bundle exec rake lint --trace | |
| - name: Check metadata.json | |
| run: bundle exec rake metadata_lint | |
| syntax: | |
| name: Syntax | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| puppet: | |
| - '8' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.2' | |
| bundler-cache: true | |
| - name: Install dependencies | |
| run: bundle install | |
| env: | |
| PUPPET_GEM_VERSION: "~> ${{ matrix.puppet }}" | |
| - name: Validate syntax | |
| run: bundle exec rake syntax | |
| env: | |
| PUPPET_GEM_VERSION: "~> ${{ matrix.puppet }}" | |
| unit: | |
| name: Unit Tests (Puppet ${{ matrix.puppet }}, Ruby ${{ matrix.ruby }}) | |
| runs-on: ubuntu-latest | |
| needs: | |
| - lint | |
| - syntax | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - puppet: '8' | |
| ruby: '3.2' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Ruby ${{ matrix.ruby }} | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true | |
| - name: Install dependencies | |
| run: bundle install | |
| env: | |
| PUPPET_GEM_VERSION: "~> ${{ matrix.puppet }}" | |
| - name: Run RSpec tests | |
| run: bundle exec rake spec | |
| env: | |
| PUPPET_GEM_VERSION: "~> ${{ matrix.puppet }}" | |
| acceptance: | |
| name: Acceptance (${{ matrix.nodeset }}) | |
| runs-on: ubuntu-latest | |
| needs: unit | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| nodeset: | |
| - debian12 | |
| - debian11 | |
| - ubuntu2204 | |
| - ubuntu2404 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.2' | |
| bundler-cache: false | |
| - name: Install dependencies | |
| run: | | |
| bundle config set --local with 'acceptance' | |
| bundle install | |
| - name: Run acceptance tests | |
| run: bundle exec rake beaker:${{ matrix.nodeset }} | |
| env: | |
| BEAKER_destroy: 'onpass' | |
| BEAKER_HYPERVISOR: docker | |
| release: | |
| name: Release to Puppet Forge | |
| runs-on: ubuntu-latest | |
| needs: | |
| - unit | |
| - acceptance | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.2' | |
| bundler-cache: true | |
| - name: Install dependencies | |
| run: | | |
| bundle config set --local with 'release' | |
| bundle install | |
| - name: Build and publish to Forge | |
| run: bundle exec rake module:push | |
| env: | |
| BLACKSMITH_FORGE_API_KEY: ${{ secrets.FORGE_API_KEY }} |