Skip to content

Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.

feat: adding tests

Paulo Castellanofb732495b2fc
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 8c3178fba..aa1df6f09 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -9,6 +9,15 @@ on:
jobs:
tests:
runs-on: ubuntu-latest
+ env:
+ DB_CONNECTION: pgsql
+ DB_DATABASE: trypost_test
+ DB_USERNAME: postgres
+ DB_PASSWORD: password
+ BROADCAST_CONNECTION: "null"
+ CACHE_STORE: array
+ QUEUE_CONNECTION: sync
+ SESSION_DRIVER: array
services:
postgres:
@@ -18,7 +27,7 @@ jobs:
POSTGRES_PASSWORD: password
POSTGRES_DB: trypost_test
ports:
- - 5432:5432
+ - 5432/tcp
options: >-
--health-cmd="pg_isready"
--health-interval=10s
@@ -28,7 +37,7 @@ jobs:
redis:
image: redis:7
ports:
- - 6379:6379
+ - 6379/tcp
options: >-
--health-cmd="redis-cli ping"
--health-interval=10s
@@ -69,10 +78,21 @@ jobs:
run: npm run build
- name: Prepare environment
- run: cp .env.ci .env
+ run: |
+ cp .env.ci .env
+ php artisan key:generate
+
+ - name: Clear Config
+ run: php artisan config:clear
- name: Run migrations
run: php artisan migrate --force
+ env:
+ DB_PORT: ${{ job.services.postgres.ports['5432'] }}
+ REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
- name: Run tests
run: php artisan test --compact
+ env:
+ DB_PORT: ${{ job.services.postgres.ports['5432'] }}
+ REDIS_PORT: ${{ job.services.redis.ports['6379'] }}