This repository has been archived by the owner on Oct 24, 2024. It is now read-only.
Bump pg from 1.5.7 to 1.5.8 #1248
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build_and_test: | |
name: Build and test | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:12 | |
env: | |
POSTGRES_USER: all_sorns | |
POSTGRES_DB: all_sorns_test | |
POSTGRES_PASSWORD: postgres | |
ports: ["5432:5432"] | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
# runs 'bundle install' and caches installed gems automatically | |
bundler-cache: true | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22.3.0 | |
cache: 'yarn' | |
- name: install javascript dependencies | |
run: yarn install --frozen-lockfile | |
- name: Setup test database | |
env: | |
RAILS_ENV: test | |
PGHOST: localhost | |
POSTGRES_DB: all_sorns_test | |
POSTGRES_USER: all_sorns | |
POSTGRES_PASSWORD: postgres | |
run: | | |
cp config/database.ci.yml config/database.yml | |
bundle exec rake db:create db:migrate | |
- name: Run rails tests | |
env: | |
PGHOST: localhost | |
POSTGRES_DB: all_sorns_test | |
POSTGRES_USER: all_sorns | |
POSTGRES_PASSWORD: postgres | |
PGPORT: ${{ job.services.postgres.ports[5432] }} | |
RAILS_ENV: test | |
run: bundle exec rake spec |