Migrate Danger to danger-pr-comment workflow #106
Workflow file for this run
This file contains hidden or 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: CI | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| entry: | |
| - { ruby: '2.7', mongodb: '4.4', mongoid: '6' } | |
| - { ruby: '2.7', mongodb: '4.4', mongoid: '7' } | |
| - { ruby: '3.0', mongodb: '4.4', mongoid: '6' } | |
| - { ruby: '3.0', mongodb: '4.4', mongoid: '7' } | |
| - { ruby: '3.2', mongodb: '5.0', mongoid: '7' } | |
| - { ruby: '3.2', mongodb: '6.0', mongoid: '7' } | |
| - { ruby: '3.1', mongodb: '4.4', mongoid: '8' } | |
| - { ruby: '3.2', mongodb: '5.0', mongoid: '8' } | |
| - { ruby: '3.2', mongodb: '6.0', mongoid: '8' } | |
| - { ruby: '3.2', mongodb: '7.0', mongoid: '8' } | |
| - { ruby: '3.3', mongodb: '6.0', mongoid: '9' } | |
| - { ruby: '3.3', mongodb: '7.0', mongoid: '9' } | |
| name: test (ruby=${{ matrix.entry.ruby }}, mongodb=${{ matrix.entry.mongodb }}), mongoid=${{ matrix.entry.mongoid }}) | |
| env: | |
| MONGOID_VERSION: ${{ matrix.entry.mongoid }} | |
| steps: | |
| - name: Set up MongoDB ${{ matrix.entry.mongodb }} | |
| uses: supercharge/mongodb-github-action@1.8.0 | |
| with: | |
| mongodb-version: ${{ matrix.entry.mongodb }} | |
| - uses: actions/checkout@v3 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.entry.ruby }} | |
| bundler-cache: true | |
| - name: Run tests | |
| run: bundle exec rspec | |
| - name: Run examples | |
| run: bundle exec ruby examples/feed.rb | |
| - name: Report Coverage | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| flag-name: run-${{ join(matrix.*, '-') }} | |
| parallel: true | |
| upload-coverage: | |
| needs: test | |
| if: ${{ always() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Upload Code Coverage Report | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| parallel-finished: true |