Skip to content

Commit

Permalink
chore: update test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Nov 27, 2020
1 parent a642ebc commit b2ded99
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,43 @@ jobs:
env:
DATABASE_ADAPTER: github_actions_postgres
INSTALL_PG: "true"
mysql:
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 }}
- uses: mirromutth/[email protected]
with:
#host port: 3800 # 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_PG: "true"
- run: "bundle exec rake"
env:
DATABASE_ADAPTER: github_actions_mysql
INSTALL_MYSQL: "true"
6 changes: 6 additions & 0 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ test:
password: postgres
host: localhost
port: "5432"
github_actions_mysql:
adapter: mysql
database: pact_broker
username: pact_broker
password: pact_broker
host: localhost

development:
default:
Expand Down

0 comments on commit b2ded99

Please sign in to comment.