[release] 2.6.0 - Add Support for Release Pipelines (#400) #1674
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: build-and-test | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main, performance-improvements] | |
| pull_request: | |
| branches: [main, performance-improvements] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| max-parallel: 1 | |
| matrix: | |
| version: [3.2.0, 2.5.0] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.version }} | |
| - name: Install dependencies | |
| run: | | |
| bundle config set --local without 'rubocop' | |
| bundle install | |
| - name: Run tests | |
| run: rake test | |
| env: | |
| test_api_key: ${{ secrets.SDK_CONSISTENCY_TEST_COMPANY_API_KEY }} | |
| test_client_key: ${{ secrets.KONG_CLIENT_SDK_KEY }} | |
| COVERAGE: ${{ matrix.version == '3.2.0' }} | |
| COVERAGE_FORMAT: "cobertura" | |
| - name: Run tests in parallel | |
| run: bundle exec rake parallel:test | |
| env: | |
| test_api_key: ${{ secrets.SDK_CONSISTENCY_TEST_COMPANY_API_KEY }} | |
| test_client_key: ${{ secrets.KONG_CLIENT_SDK_KEY }} | |
| - name: Code Coverage Report | |
| uses: irongut/[email protected] | |
| if: ${{ matrix.version == '3.2.0' }} | |
| with: | |
| filename: coverage/coverage.xml | |
| badge: true | |
| fail_below_min: true | |
| format: markdown | |
| hide_branch_rate: false | |
| hide_complexity: true | |
| indicators: true | |
| output: both | |
| thresholds: "70 80" | |
| - name: Add Coverage PR Comment | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| if: ${{ github.event_name == 'pull_request' && matrix.version == '3.2.0' }} | |
| with: | |
| recreate: true | |
| path: code-coverage-results.md |