|
| 1 | +name: Tests |
| 2 | + |
| 3 | +# workflow_dispatch enables running workflow manually |
| 4 | +on: [push, pull_request, workflow_dispatch] |
| 5 | + |
| 6 | +jobs: |
| 7 | + rubocop: |
| 8 | + name: RuboCop |
| 9 | + runs-on: ${{ matrix.os }} |
| 10 | + if: | |
| 11 | + !( contains(github.event.pull_request.title, '[ci skip]') |
| 12 | + || contains(github.event.pull_request.title, '[skip ci]') |
| 13 | + || contains(github.event.head_commit.message, '[ci skip]') |
| 14 | + || contains(github.event.head_commit.message, '[skip ci]')) |
| 15 | + strategy: |
| 16 | + fail-fast: false |
| 17 | + matrix: |
| 18 | + os: [ubuntu-20.04] |
| 19 | + ruby: [2.7] |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v2 |
| 22 | + - uses: ruby/setup-ruby@v1 |
| 23 | + with: |
| 24 | + bundler-cache: true |
| 25 | + ruby-version: ${{ matrix.ruby }} |
| 26 | + - run: bundle exec rake rubocop |
| 27 | + |
| 28 | + specs: |
| 29 | + name: ${{ matrix.os }} ${{ matrix.ruby }} |
| 30 | + runs-on: ${{ matrix.os }} |
| 31 | + if: | |
| 32 | + !( contains(github.event.pull_request.title, '[ci skip]') |
| 33 | + || contains(github.event.pull_request.title, '[skip ci]') |
| 34 | + || contains(github.event.head_commit.message, '[ci skip]') |
| 35 | + || contains(github.event.head_commit.message, '[skip ci]')) |
| 36 | + strategy: |
| 37 | + fail-fast: false |
| 38 | + matrix: |
| 39 | + os: |
| 40 | + - ubuntu-16.04 |
| 41 | + - ubuntu-18.04 |
| 42 | + - ubuntu-20.04 |
| 43 | + ruby: |
| 44 | + - 2.3 |
| 45 | + - 2.4 |
| 46 | + - 2.5 |
| 47 | + - 2.6 |
| 48 | + - 2.7 |
| 49 | + # YAML gotcha: https://github.com/actions/runner/issues/849 |
| 50 | + - '3.0' |
| 51 | + - head |
| 52 | + include: |
| 53 | + - os: ubuntu-20.04 |
| 54 | + ruby: jruby-9.1 |
| 55 | + jruby_opts: '--client -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Xss2m -J-Xmx256M' |
| 56 | + allow-failure: true |
| 57 | + - os: ubuntu-20.04 |
| 58 | + ruby: jruby-9.2 |
| 59 | + jruby_opts: '--client -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Xss2m -J-Xmx256M' |
| 60 | + allow-failure: true |
| 61 | + - os: ubuntu-20.04 |
| 62 | + ruby: jruby-head |
| 63 | + jruby_opts: '--client -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Xss2m -J-Xmx256M' |
| 64 | + allow-failure: true |
| 65 | + steps: |
| 66 | + - uses: actions/checkout@v2 |
| 67 | + - uses: ruby/setup-ruby@v1 |
| 68 | + with: |
| 69 | + bundler-cache: true |
| 70 | + ruby-version: ${{ matrix.ruby }} |
| 71 | + - run: bundle exec rake |
| 72 | + continue-on-error: ${{ matrix.allow-failure || false }} |
| 73 | + |
| 74 | + smoketests: |
| 75 | + name: smoketest with influx ${{ matrix.influx_version }} |
| 76 | + runs-on: ubuntu-20.04 |
| 77 | + if: | |
| 78 | + !( contains(github.event.pull_request.title, '[ci skip]') |
| 79 | + || contains(github.event.pull_request.title, '[skip ci]') |
| 80 | + || contains(github.event.head_commit.message, '[ci skip]') |
| 81 | + || contains(github.event.head_commit.message, '[skip ci]')) |
| 82 | + strategy: |
| 83 | + fail-fast: false |
| 84 | + matrix: |
| 85 | + include: |
| 86 | + - { ruby: 2.7, influx_version: 1.0.2, pkghash: 88f6c30fec2c6e612e802e23b9161fdfc7c5c29f6be036f0376326445aff0037 } |
| 87 | + - { ruby: 2.7, influx_version: 1.1.5, pkghash: 0ecb9385cc008f6e5094e6e8f8ea70522023a16d4397e401898f3973176d3b21 } |
| 88 | + - { ruby: 2.7, influx_version: 1.2.4, pkghash: 2fac8391e04aa1bec9151e8f0d8f18df030c866af2b4963ab7d86c6ddc172182 } |
| 89 | + - { ruby: 2.7, influx_version: 1.3.8, pkghash: 35c9cb2943bbde04aa5e94ad6d8caf5fc9b1480bdbcde7c34078de135cc4f788 } |
| 90 | + - { ruby: 2.7, influx_version: 1.4.3, pkghash: 0477080f1d1cf8e1242dc7318280b9010c4c45cf6a415a2a5de607ae17fa0359 } |
| 91 | + - { ruby: 2.7, influx_version: 1.5.4, pkghash: fa6f8d3196d13ffc376d533581b534692c738181ce3427c53484c138d9e6b902 } |
| 92 | + - { ruby: 2.7, influx_version: 1.6.4, pkghash: dbfa13a0f9e38a8e7b19294c30144903bb681ac0aba0a3a8f4f349c37d5de5f9 } |
| 93 | + - { ruby: 2.7, influx_version: 1.7.9, pkghash: 02759d70cef670d336768fd38a9cf2f046a1bf40618be78ba215e7ce75b5075f } |
| 94 | + - { ruby: 2.7, influx_version: nightly, channel: nightlies, allow-failure: true } |
| 95 | + env: |
| 96 | + influx_version: ${{ matrix.influx_version }} |
| 97 | + pkghash: ${{ matrix.pkghash }} |
| 98 | + channel: ${{ matrix.channel }} |
| 99 | + steps: |
| 100 | + - uses: actions/checkout@v2 |
| 101 | + - uses: ruby/setup-ruby@v1 |
| 102 | + with: |
| 103 | + bundler-cache: true |
| 104 | + ruby-version: ${{ matrix.ruby }} |
| 105 | + - run: bin/provision.sh |
| 106 | + - run: bundle exec rake spec |
| 107 | + continue-on-error: ${{ matrix.allow-failure || false }} |
0 commit comments