From c850b3f9c16735e58776cc0fb32c8973873f23d8 Mon Sep 17 00:00:00 2001 From: Jeremy Woertink Date: Sun, 20 Oct 2024 11:13:56 -0700 Subject: [PATCH] remove all use of connecting to postgres since the specs don't actually need it --- .github/workflows/ci.yml | 9 --------- config.cr | 14 ++------------ spec/spec_helper.cr | 6 ------ 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 56a8a84..20b6866 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,13 +40,6 @@ jobs: continue-on-error: ${{ matrix.experimental }} steps: - uses: actions/checkout@v4 - - name: Setup PostgreSQL v${{ matrix.postgres_version }} - uses: ikalnytskyi/action-setup-postgres@v6 - with: - username: lucky - password: developer - port: 5432 - postgres-version: ${{ matrix.postgres_version }} - uses: crystal-lang/install-crystal@v1 with: crystal: ${{matrix.crystal_version}} @@ -54,5 +47,3 @@ jobs: run: shards install --skip-postinstall --skip-executables - name: Run tests run: crystal spec - env: - DATABASE_URL: postgres://lucky:developer@localhost:5432/authentic_test diff --git a/config.cr b/config.cr index 176cda3..dfeb098 100644 --- a/config.cr +++ b/config.cr @@ -1,19 +1,9 @@ -database = "authentic_test" - class AppDatabase < Avram::Database end +# The specs for this shard don't actually make DB queries AppDatabase.configure do |settings| - if ENV["DATABASE_URL"]? - settings.credentials = Avram::Credentials.parse(ENV["DATABASE_URL"]) - else - settings.credentials = Avram::Credentials.new( - database: database, - hostname: "db", - username: "lucky", - password: "developer" - ) - end + settings.credentials = Avram::Credentials.parse("postgres://fake:password@localhost:5432/not_used") end Avram.configure do |settings| diff --git a/spec/spec_helper.cr b/spec/spec_helper.cr index ca74826..e0e1f68 100644 --- a/spec/spec_helper.cr +++ b/spec/spec_helper.cr @@ -2,9 +2,3 @@ require "spec" require "../src/authentic" require "../config" require "./support/**" - -# Db::Setup.new(quiet: true).run_task - -# Spec.before_each do -# AppDatabase.truncate -# end