Sha256: ac85f448a944f8cb1a092d2e11b6cccbacafde51e73daffa4801508de8470f99

Contents?: true

Size: 1.62 KB

Versions: 2

Compression:

Stored size: 1.62 KB

Contents

name: Run specs and generate Code Climate report
on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]
jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        ruby-version: [2.3, 2.4, 2.5, 2.6, 2.7, 3.0]
    steps:
      - uses: actions/checkout@v2
      - name: Set up Ruby ${{ matrix.ruby-version }}
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby-version }}
          bundler-cache: true
      - name: Install dependencies
        run: bundle install
      - name: Set ENV for codeclimate (pull_request)
        run: |
          git fetch --no-tags --prune --depth=1 origin +refs/heads/$GITHUB_HEAD_REF:refs/remotes/origin/$GITHUB_HEAD_REF
          echo "GIT_BRANCH=$GITHUB_HEAD_REF" >> $GITHUB_ENV
          echo "GIT_COMMIT_SHA=$(git rev-parse origin/$GITHUB_HEAD_REF)" >> $GITHUB_ENV
        if: github.event_name == 'pull_request'
      - name: Set ENV for codeclimate (push)
        run: |
          echo "GIT_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
          echo "GIT_COMMIT_SHA=$GITHUB_SHA" >> $GITHUB_ENV
        if: github.event_name == 'push'
      - name: Install Code Climate test report
        run: |
          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
      - name: Run tests
        run: bundle exec rake
      - name: Send Report to Code Climate
        env:
          CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
        if: ${{ success() }}
        run: ./cc-test-reporter after-build

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
chartmogul-ruby-3.1.0 .github/workflows/test.yml
chartmogul-ruby-3.0.2 .github/workflows/test.yml