]> gitweb.mndrdr.org Git - arelpe.git/commitdiff
Fiddling with test some more for CI etc
authorAidan Cornelius-Bell <[email protected]>
Tue, 31 Dec 2024 20:44:21 +0000 (07:14 +1030)
committerAidan Cornelius-Bell <[email protected]>
Tue, 31 Dec 2024 20:44:21 +0000 (07:14 +1030)
.github/workflows/ci.yml
config/database.yml

index da7f229f428b63a9fc3e43c80aa4971c08212907..1d6393fbd5d1fac8175ecad3ce190cfab35abe5c 100644 (file)
@@ -38,6 +38,7 @@ jobs:
         image: mysql:8.0
         env:
           MYSQL_ALLOW_EMPTY_PASSWORD: true
+          MYSQL_DATABASE: arelpe_test
         ports:
           - 3306:3306
         options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
@@ -58,8 +59,8 @@ jobs:
       - name: Setup test database and run tests
         env:
           RAILS_ENV: test
-          DATABASE_URL: mysql2://127.0.0.1:3306
-          # REDIS_URL: redis://localhost:6379/0
+          DATABASE_URL: mysql2://[email protected]:3306/arelpe_test
+          MYSQL_ALLOW_EMPTY_PASSWORD: true
           ENCRYPTION_PRIMARY_KEY: ${{ secrets.ENCRYPTION_PRIMARY_KEY || 'test_primary_key_1234567890' }}
           ENCRYPTION_DETERMINISTIC_KEY: ${{ secrets.ENCRYPTION_DETERMINISTIC_KEY || 'test_deterministic_key_1234567890' }}
           ENCRYPTION_KEY_DERIVATION_SALT: ${{ secrets.ENCRYPTION_KEY_DERIVATION_SALT || 'test_derivation_salt_1234567890' }}
index 0fe2e446690f79b6045b878882dc3471ee2c7dd1..bc064143e280b3995db06351862b86b9200e300b 100644 (file)
@@ -22,8 +22,16 @@ development:
   database: arelpe_development
 
 test:
-  <<: *default
-  database: arelpe_test
+  adapter: mysql2
+  encoding: utf8mb4
+  collation: utf8mb4_0900_ai_ci
+  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
+  url: <%= ENV['DATABASE_URL'] %>
+  database: <%= ENV.fetch('MYSQL_DATABASE') { 'arelpe_test' } %>
+  username: <%= ENV.fetch('MYSQL_USERNAME') { 'root' } %>
+  password: <%= ENV.fetch('MYSQL_PASSWORD') { nil } %>
+  host: <%= ENV.fetch('MYSQL_HOST') { '127.0.0.1' } %>
+  port: <%= ENV.fetch('MYSQL_PORT') { 3306 } %>
 
 production:
   <<: *default