Skip to content

Commit

Permalink
Don't wait for PG to be ready to progress in GH CI (#56)
Browse files Browse the repository at this point in the history
It takes around 10 seconds for Postgres to boot up, and the current buffer between when it's initialized and when it has to be ready is 30+ seconds, so we should be fine to shave off the time, but we can always add it back in if necessary.
  • Loading branch information
northeastprince authored Jul 20, 2023
1 parent 0b6a9e0 commit 7bd9b8d
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,21 @@ jobs:
ports: ["5432:5432"]
env:
POSTGRES_HOST_AUTH_METHOD: trust
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup Postgres
run: bundle exec rails db:create
env:
DATABASE_URL: postgresql://[email protected]:5432
RAILS_ENV: test
- name: Update apt
- name: Install system dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: sudo apt-get update -yqq
- name: Install libvips
env:
DEBIAN_FRONTEND: noninteractive
run: sudo apt-get install -yqq libvips
run: |
sudo apt-get update -yqq
sudo apt-get install -yqq libvips
- name: Run tests
run: bundle exec rails test:all
run: bundle exec rails db:create test:all
env:
RAILS_ENV: test
DATABASE_URL: postgresql://[email protected]:5432

0 comments on commit 7bd9b8d

Please sign in to comment.