diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index da3bc68..62e5fa7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,14 +10,19 @@ jobs: fail-fast: false matrix: + db: + - mysql + - postgres + ruby: - '2.7' - '3.0' - '3.1' - db: - - mysql - - postgres + services: + env: + DB: ${{ matrix.db }} + mysql: env: MYSQL_DATABASE: rating_test @@ -28,24 +33,24 @@ jobs: ports: - 3306:3306 + postgres: - image: postgres env: - POSTGRES_DB: rating_user - POSTGRES_USER: rating_user - POSTGRES_PASSWORD: rating_password + POSTGRES_DB: rating_test + POSTGRES_USER: postgres + POSTGRES_HOST_AUTH_METHOD: trust + + image: postgres + options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + ports: - 5432:5432 - env: - DB: ${{ matrix.db }} - POSTGRES_USER: rating_user - POSTGRES_PASSWORD: rating_password steps: - name: Checkout uses: actions/checkout@v3