name: CI on: push: pull_request: jobs: lint: name: RuboCop timeout-minutes: 30 runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: "3.0" bundler-cache: true - name: Run RuboCop run: bundle exec rubocop test: runs-on: ${{ matrix.os }}-latest strategy: matrix: os: - ubuntu - macos ruby-version: - jruby-9.4 - 3.3 - 3.2 - 3.1 - '3.0' - 2.7 needs: - lint steps: - uses: actions/checkout@v4 - name: Set up Ruby ${{ matrix.ruby-version }} uses: ruby/setup-ruby@v1 with: bundler-cache: true ruby-version: ${{ matrix.ruby-version }} - name: Install dependencies run: bundle install - name: Get test project semver id: get_semver run: | semver=$(ruby echo_client_spec_version.rb) echo "::set-output name=semver::$semver" - name: Download test cases run: git clone --depth 5 --branch v${{ steps.get_semver.outputs.semver }} https://github.com/Unleash/client-specification.git client-specification - name: Run tests run: bundle exec rake env: COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Coveralls Parallel uses: coverallsapp/github-action@master with: github-token: ${{ secrets.GITHUB_TOKEN }} flag-name: run-${{ matrix.test_number }} parallel: true - name: Notify Slack of pipeline completion uses: 8398a7/action-slack@v3 if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }} with: status: ${{ job.status }} text: Built on ${{ matrix.os }} - Ruby ${{ matrix.ruby-version }} fields: repo,message,commit,author,action,eventName,ref,workflow,job,took env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} finish: needs: test runs-on: ubuntu-latest steps: - name: Coveralls Finished uses: coverallsapp/github-action@master with: github-token: ${{ secrets.GITHUB_TOKEN }} parallel-finished: true