Updated requirements. #21
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 | |
- develop | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.1' | |
bundler-cache: true | |
- name: Build | |
run: bundle exec rake build | |
- name: Archive build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
path: pkg/*.gem | |
test: | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
matrix: | |
ruby-version: | |
- '2.6' | |
- '3.1' | |
- '3.2' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true | |
- name: Run tests | |
run: bundle exec rake spec | |
- name: Test Report Ruby ${{ matrix.ruby-version }} | |
uses: mikepenz/action-junit-report@v3 | |
if: always() | |
with: | |
report_paths: test-reports/rspec.xml | |
check_name: RSpec Test Report Ruby ${{ matrix.ruby-version }} | |
detailed_summary: true | |
- name: Code Coverage Report Ruby ${{ matrix.ruby-version }} | |
uses: irongut/[email protected] | |
with: | |
filename: coverage/coverage.xml | |
badge: true | |
indicators: true | |
hide_branch_rate: true | |
verify: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.1' | |
bundler-cache: true | |
- name: Documentation | |
run: bundle exec rake yard | |
- name: Rubocop | |
run: bundle exec rake rubocop |