Use the opensearch-ruby
gem
#26
Workflow file for this run
This file contains 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 | |
pull_request: | |
branches: | |
- main | |
jobs: | |
rubocop: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.1' | |
bundler-cache: true | |
- name: Run static code analysis | |
run: bundle exec rubocop | |
test: | |
runs-on: ubuntu-latest | |
needs: rubocop | |
strategy: | |
matrix: | |
ruby: | |
- "2.6" | |
- "2.7" | |
- "3.0" | |
- "3.1" | |
- "3.2" | |
- "3.3" | |
name: Ruby ${{ matrix.ruby }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Run tests without uploading code coverage | |
if: ${{ matrix.ruby != '3.0' }} | |
run: bundle exec rake | |
- name: Run tests and upload coverage to Code Climate | |
if: ${{ matrix.ruby == '3.0' }} | |
uses: paambaati/[email protected] | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_TOKEN }} | |
with: | |
coverageCommand: bundle exec rake |