---

name: RSpec

on:
  pull_request:
    branches:
      - develop
  push:
    branches-ignore:
      - master
      - develop

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        ruby-version: ['2.6', '2.7', '3.0']
        database: ['true', 'false']
    steps:
      - uses: actions/checkout@v2
      - name: Up rabbitmq
        run: docker-compose up -d rabbit mongo
      - name: Build the container
        run: docker-compose build
      - name: Up janus
        run: docker-compose up -d janus janus_token
      - name: Test classic
        run: docker-compose run gem env MONGO=${{ matrix.database }} bundle exec rake classic
      - name: Test concurrency
        run: docker-compose run gem env MONGO=${{ matrix.database }} bundle exec rake concurrency
      - uses: actions/upload-artifact@master
        with:
          name: coverage
          path: coverage/coverage.json
  coverage:
    needs: [ test ]
    name: coverage
    runs-on: ubuntu-latest
    steps:
      - uses: actions/upload-artifact@master
        with:
          name: coverage
          path: coverage/coverage.json
      - name: Publish code coverage
        uses: paambaati/codeclimate-action@v2.7.5
        env:
          CC_TEST_REPORTER_ID: "${{secrets.CC_TEST_REPORTER_ID}}"
        with:
          coverageLocations: |
            ${{github.workspace}}/coverage/coverage.json:simplecov

---

name: RSpec

on:
  pull_request:
    branches:
      - develop
  push:
    branches-ignore:
      - master
      - develop

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        ruby-version: ['2.6', '2.7', '3.0']
        database: ['true', 'false']
    steps:
      - uses: actions/checkout@v2
      - name: Up rabbitmq
        run: docker-compose up -d rabbit mongo
      - name: Build the container
        run: docker-compose build
      - name: Up janus
        run: docker-compose up -d janus janus_token
      - name: Test classic
        run: docker-compose run gem env MONGO=${{ matrix.database }} bundle exec rake classic
      - name: Test concurrency
        run: docker-compose run gem env MONGO=${{ matrix.database }} bundle exec rake concurrency
      - uses: actions/upload-artifact@master
        with:
          name: coverage
          path: coverage/coverage.json
  coverage:
    needs: [ test ]
    name: coverage
    runs-on: ubuntu-latest
    steps:
      - uses: actions/upload-artifact@master
        with:
          name: coverage
          path: coverage/coverage.json
      - name: Publish code coverage
        uses: paambaati/codeclimate-action@v2.7.1
        env:
          CC_TEST_REPORTER_ID: "${{secrets.CC_TEST_REPORTER_ID}}"
        with:
          coverageLocations: |
            ${{github.workspace}}/coverage/coverage.json:simplecov

Change version of deploy coverage result
Change version of deploy coverage result
