|
| 1 | +name: Supported Rubies |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + - '*-maintenance' |
| 8 | + - '*-dev' |
| 9 | + tags: |
| 10 | + - '!*' # Do not execute on tags |
| 11 | + pull_request: |
| 12 | + branches: |
| 13 | + - '*' |
| 14 | + |
| 15 | +jobs: |
| 16 | + test: |
| 17 | + name: Specs - Ruby ${{ matrix.ruby }} ${{ matrix.name_extra || '' }} |
| 18 | + if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" |
| 19 | + strategy: |
| 20 | + fail-fast: false |
| 21 | + matrix: |
| 22 | + ruby: |
| 23 | + - truffleruby-head |
| 24 | + - ruby-head |
| 25 | + - 3.0 |
| 26 | + - 2.7 |
| 27 | + - 2.6 |
| 28 | + runs-on: ubuntu-latest |
| 29 | + continue-on-error: ${{ matrix.allow_failure || endsWith(matrix.ruby, 'head') }} |
| 30 | + steps: |
| 31 | + - uses: amancevice/setup-code-climate@v0 |
| 32 | + name: CodeClimate Install |
| 33 | + if: matrix.ruby == '2.6' && github.event_name != 'pull_request' |
| 34 | + with: |
| 35 | + cc_test_reporter_id: ${{ secrets.CC_TEST_REPORTER_ID }} |
| 36 | + - name: Checkout |
| 37 | + uses: actions/checkout@v2 |
| 38 | + - name: Install cURL Headers |
| 39 | + run: sudo apt-get install libcurl4-openssl-dev |
| 40 | + - name: Setup Ruby & Bundle |
| 41 | + uses: ruby/setup-ruby@v1 |
| 42 | + with: |
| 43 | + ruby-version: ${{ matrix.ruby }} |
| 44 | + bundler-cache: true |
| 45 | + - name: CodeClimate Pre-build Notification |
| 46 | + run: cc-test-reporter before-build |
| 47 | + if: matrix.ruby == '2.6' && github.event_name != 'pull_request' |
| 48 | + continue-on-error: ${{ matrix.allow_failures != 'false' }} |
| 49 | + - name: Run tests |
| 50 | + run: bundle exec rake test |
| 51 | + - uses: codecov/codecov-action@v2 |
| 52 | + if: matrix.ruby == '2.6' && github.event_name != 'pull_request' |
| 53 | + with: |
| 54 | + flags: unittests |
| 55 | + name: codecov-upload |
| 56 | + fail_ci_if_error: true |
| 57 | + - name: CodeClimate Post-build Notification |
| 58 | + run: cc-test-reporter after-build |
| 59 | + if: matrix.ruby == '2.6' && github.event_name != 'pull_request' && always() |
| 60 | + continue-on-error: ${{ matrix.allow_failures != 'false' }} |
0 commit comments