Remake for TARA strategy #10
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: Main | |
on: | |
push: | |
branches: | |
- main | |
- master | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: ["2.7", "3.0", "3.1", "3.2"] | |
name: Ruby ${{ matrix.ruby }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Config bundler | |
run: | | |
bundle config set without 'development staging production' | |
bundle config set deployment '[secure]' | |
bundle env | |
head -n1 $(which bundle) | |
- name: Run tests | |
run: | | |
gem install bundler -v '>= 2.2.10' | |
gem install simplecov -v '~> 0.21' | |
gem install builder | |
gem install webmock | |
gem install minitest | |
gem install mocha | |
bundle install | |
rake | |
- name: Coveralls Parallel | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.github_token }} | |
flag-name: ruby-${{ matrix.ruby }} | |
parallel: true | |
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 | |
rubocop: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
ruby-version: "2.7" | |
- name: rubocop | |
run: bundle exec rubocop --parallel |