name: Build on: [push, workflow_dispatch] jobs: build: name: Build + Test runs-on: ubuntu-latest services: postgres: image: postgres:11 ports: - "2345:5432" env: POSTGRES_USER: test POSTGRES_PASSWORD: test mysql: image: mysql:5 ports: - "3306:3306" env: MYSQL_ROOT_PASSWORD: test MYSQL_USER: test MYSQL_PASSWORD: test MYSQL_DATABASE: test strategy: matrix: ruby: [2.5.9, 2.6.7, 2.7.3] gemfile: [activerecord_5, rails, faker, ffaker] env: BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile steps: - name: Checkout uses: actions/checkout@v2 - name: Setup ruby uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} bundler-cache: true - name: Wait for DBs to be ready run: bundle exec rake wait_for_test_db - name: Run tests run: bundle exec rake - name: Coveralls uses: coverallsapp/github-action@master with: github-token: ${{ secrets.github_token }}