ChaelCodes/HuntersKeepers

View on GitHub
.semaphore/semaphore.yml

Summary

Maintainability
Test Coverage
version: v1.0
name: Run Tests
agent:
  machine:
    type: e1-standard-2
    os_image: ubuntu1804
blocks:
  - name: Test
    task:
      secrets:
        - name: code-climate-test-reporter-id
      jobs:
        - name: Test
          commands:
            - checkout
            - docker-compose build
            - docker-compose run --rm web yarn install --check-files
            - docker-compose run --rm web rake db:test:prepare
            - 'curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter'
            - chmod +x ./cc-test-reporter
            - ./cc-test-reporter before-build
            - docker-compose run --rm web bundle exec rspec
      epilogue:
        on_pass:
          commands:
            - ./cc-test-reporter after-build --exit-code 0
        on_fail:
          commands:
            - ./cc-test-reporter after-build --exit-code 1