name: Test on: push jobs: sqlite: runs-on: "ubuntu-latest" strategy: matrix: ruby_version: ["2.7"] steps: - uses: actions/checkout@v2 - uses: actions/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby_version }} - run: "bundle install" - run: "bundle exec rake" postgres: runs-on: "ubuntu-latest" strategy: matrix: ruby_version: ["2.5", "2.7"] services: postgres: image: postgres env: POSTGRES_PASSWORD: postgres options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 ports: - 5432:5432 steps: - uses: actions/checkout@v2 - uses: actions/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby_version }} - run: "bundle install" env: INSTALL_PG: "true" - run: "bundle exec rake" env: DATABASE_ADAPTER: github_actions_postgres INSTALL_PG: "true" mysql: runs-on: "ubuntu-latest" strategy: matrix: ruby_version: ["2.7"] steps: - uses: actions/checkout@v2 - uses: actions/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby_version }} - uses: mirromutth/mysql-action@v1.1 with: host port: 3306 # Optional, default value is 3306. The port of host #container port: 3307 # Optional, default value is 3306. The port of container character set server: 'utf8' # Optional, default value is 'utf8mb4'. The '--character-set-server' option for mysqld collation server: 'utf8_general_ci' # Optional, default value is 'utf8mb4_general_ci'. The '--collation-server' option for mysqld mysql version: '8.0' # Optional, default value is "latest". The version of the MySQL mysql database: 'pact_broker' # Optional, default value is "test". The specified database which will be create mysql root password: 'pact_broker' # Required if "mysql user" is empty, default is empty. The root superuser password mysql user: 'pact_broker' # Required if "mysql root password" is empty, default is empty. The superuser for the specified database. Can use secrets, too mysql password: 'pact_broker' # Required if "mysql user" exists. The password for the "mysql user" - run: "bundle install" env: INSTALL_MYSQL: "true" - run: "bundle exec rake" env: DATABASE_ADAPTER: github_actions_mysql INSTALL_MYSQL: "true"