name: CI on: [push] jobs: build: runs-on: ubuntu-latest name: Ruby ${{ matrix.ruby }} | Gemfile ${{ matrix.gemfile }} services: redis: image: redis ports: - 6379:6379 strategy: matrix: ruby: [2.5, 2.6, 2.7, 3.0] gemfile: [rails_5_2, rails_6_0, rails_edge] exclude: - ruby: 2.5 gemfile: rails_edge - ruby: 2.6 gemfile: rails_edge - ruby: 3.0 gemfile: rails_5_2 env: BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile steps: - name: Check out code uses: actions/checkout@v2 - name: Set up Ruby ${{ matrix.ruby }} uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} bundler-cache: true - name: Start MySQL and create DB run: | sudo systemctl start mysql.service mysql -uroot -h localhost -proot -e "CREATE DATABASE job_iteration_test;" - name: Rubocop run: bundle exec rubocop - name: Ruby tests run: bundle exec rake test env: REDIS_HOST: localhost REDIS_PORT: ${{ job.services.redis.ports[6379] }} - name: Documentation correctly written run: bundle exec yardoc --no-output --no-save --no-stats --fail-on-warning