Merge branch 'feat/waterdrop-2-7' into 'master' #13
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: Ruby | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ '**' ] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
env: | |
RUBY_VERSION: "3.3" | |
name: Rubocop | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Ruby w/ same version as image | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.3" | |
- name: Install dependencies | |
run: | | |
gem install dip | |
dip bundle install | |
- name: Run linter | |
run: dip rubocop | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: [ '3.0', '3.1', '3.2', '3.3' ] | |
env: | |
RUBY_VERSION: ${{ matrix.ruby }} | |
name: Ruby ${{ matrix.ruby }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Ruby w/ same version as image | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
- name: Install dependencies | |
run: | | |
gem install dip | |
dip provision | |
- name: Run tests | |
run: dip appraisal rspec --format RspecJunitFormatter --out test-results/rspec_${{ matrix.ruby }}.xml --format documentation |