diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 21839800..748ebff3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,7 @@ jobs: postgres: image: postgres:latest env: + POSTGRES_DB: postgres POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres options: >- @@ -30,9 +31,9 @@ jobs: - 5432:5432 env: CI: true - PGHOST: 127.0.0.1 - PGUSER: postgres - PGPASS: postgres + POSTGRES_HOST: localhost + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres strategy: fail-fast: false matrix: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index afd10e46..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: CI - -on: - - push - - pull_request - -jobs: - test: - runs-on: ubuntu-latest - strategy: - matrix: - ruby-version: ['3.0', '3.1', '3.2', '3.3'] - - services: - postgres: - # Docker Hub image - image: postgres - env: - POSTGRES_DB: postgres - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - ports: - - 5432/tcp - # needed because the postgres container does not provide a healthcheck - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - - steps: - - uses: actions/checkout@v2 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby-version }} - bundler-cache: true - - name: Create database - run: | - psql -c 'create database pg_search_test;' -h ${POSTGRES_HOST} -p ${POSTGRES_PORT} -U postgres >/dev/null - env: - POSTGRES_HOST: localhost - POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }} - PGPASSWORD: postgres - - name: Run tests - run: bundle exec rspec - env: - POSTGRES_HOST: localhost - POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }} - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - - name: Run RuboCop - run: bundle exec rubocop