Merge pull request #445 from ably/release/1.2.8 #634
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
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ruby: [ '2.7', '3.0', '3.1', '3.2', '3.3' ] | |
| protocol: [ 'json', 'msgpack' ] | |
| type: [ 'unit', 'acceptance' ] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: 'recursive' | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true | |
| - name: 'Run ${{ matrix.type }} tests on ruby ${{ matrix.ruby }} (${{ matrix.protocol }} protocol)' | |
| env: | |
| PARALLEL_TEST_PROCESSORS: 2 | |
| RSPEC_RETRY: true | |
| PROTOCOL: ${{ matrix.protocol }} | |
| TEST_TYPE: ${{ matrix.type }} | |
| RUBY_VERSION: ${{ matrix.ruby }} | |
| run: | | |
| mkdir junit | |
| bundle exec parallel_rspec --prefix-output-with-test-env-number --first-is-1 -- spec/${{ matrix.type }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results-ruby-${{ matrix.ruby }}-${{ matrix.protocol }}-${{ matrix.type }} | |
| path: | | |
| junit/ | |
| coverage/ | |
| retention-days: 7 | |
| - name: Upload test results | |
| if: always() | |
| uses: ably/test-observability-action@v1 | |
| with: | |
| server-url: 'https://test-observability.herokuapp.com' | |
| server-auth: ${{ secrets.TEST_OBSERVABILITY_SERVER_AUTH_KEY }} | |
| path: 'junit/' | |
| - uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| flag-name: ruby-${{ matrix.ruby }}-${{ matrix.protocol }}-${{ matrix.type }} | |
| parallel: true | |
| finish: | |
| needs: check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Coveralls Finished | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.github_token }} | |
| parallel-finished: true |