From b1dfa4558073aef607159493278af14a6c22d7bc Mon Sep 17 00:00:00 2001 From: Hanchan Date: Mon, 8 Jun 2026 00:54:12 +0700 Subject: [PATCH 1/2] fix: correct typo in CI workflow configuration. chore: change mysql into postgres in laravel & CI --- .github/workflows/ci.yml | 43 ++++++++++++++------------- backend/.env.example | 12 ++++---- backend/phpunit.xml | 8 +++-- backend/tests/Feature/ExampleTest.php | 12 ++++---- 4 files changed, 41 insertions(+), 34 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8354976..9d8a19a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: pull_request: branches: - main - - develop + - development jobs: frontend: @@ -48,15 +48,16 @@ jobs: working-directory: backend services: - mysql: - image: mysql:8.0 + postgres: + image: postgres:16 env: - MYSQL_ROOT_PASSWORD: root - MYSQL_DATABASE: testing + POSTGRES_DB: testing + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres ports: - - 3306:3306 + - 5432:5432 options: >- - --health-cmd="mysqladmin ping" + --health-cmd="pg_isready -U postgres" --health-interval=10s --health-timeout=5s --health-retries=3 @@ -69,37 +70,39 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: "8.3" - extensions: mbstring, bcmath, pdo, pdo_mysql + extensions: mbstring, bcmath, pdo, pdo_pgsql coverage: xdebug - name: Copy .env - run: cp .env.example .env.testing + run: cp .env.example .env - name: Install dependencies run: composer install --no-interaction --prefer-dist --optimize-autoloader - name: Generate app key - run: php artisan key:generate --env=testing + run: php artisan key:generate - name: Run migrations - run: php artisan migrate --env=testing --force + run: php artisan migrate --force env: - DB_CONNECTION: mysql + XDEBUG_MODE: off + DB_CONNECTION: pgsql DB_HOST: 127.0.0.1 - DB_PORT: 3306 + DB_PORT: 5432 DB_DATABASE: testing - DB_USERNAME: root - DB_PASSWORD: root + DB_USERNAME: postgres + DB_PASSWORD: postgres - name: Run tests - run: php artisan test --env=testing + run: php artisan test env: - DB_CONNECTION: mysql + XDEBUG_MODE: off + DB_CONNECTION: pgsql DB_HOST: 127.0.0.1 - DB_PORT: 3306 + DB_PORT: 5432 DB_DATABASE: testing - DB_USERNAME: root - DB_PASSWORD: root + DB_USERNAME: postgres + DB_PASSWORD: postgres docker-build: name: Docker Build Check diff --git a/backend/.env.example b/backend/.env.example index c0660ea..9426f08 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -20,12 +20,12 @@ LOG_STACK=single LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug -DB_CONNECTION=sqlite -# DB_HOST=127.0.0.1 -# DB_PORT=3306 -# DB_DATABASE=laravel -# DB_USERNAME=root -# DB_PASSWORD= +DB_CONNECTION=pgsql +DB_HOST=127.0.0.1 +DB_PORT=5432 +DB_DATABASE=laravel +DB_USERNAME=postgres +DB_PASSWORD= SESSION_DRIVER=database SESSION_LIFETIME=120 diff --git a/backend/phpunit.xml b/backend/phpunit.xml index e7f0a48..48e0914 100644 --- a/backend/phpunit.xml +++ b/backend/phpunit.xml @@ -23,8 +23,12 @@ - - + + + + + + diff --git a/backend/tests/Feature/ExampleTest.php b/backend/tests/Feature/ExampleTest.php index 5790d91..8364a84 100644 --- a/backend/tests/Feature/ExampleTest.php +++ b/backend/tests/Feature/ExampleTest.php @@ -10,10 +10,10 @@ class ExampleTest extends TestCase /** * A basic test example. */ -// public function test_the_application_returns_a_successful_response(): void -// { -// $response = $this->get('/'); -// -// $response->assertStatus(200); -// } + public function test_the_application_returns_a_successful_response(): void + { + $response = $this->get('/'); + + $response->assertStatus(200); + } } From b11c927440f7a4bc3061e51a2cf092060ee5747d Mon Sep 17 00:00:00 2001 From: Hanchan Date: Fri, 12 Jun 2026 01:01:40 +0700 Subject: [PATCH 2/2] temporarily disable docker flow on ci workflow --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d8a19a..e31bf03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -107,7 +107,8 @@ jobs: docker-build: name: Docker Build Check runs-on: ubuntu-latest - needs: [frontend, backend] + needs: [frontend] +# needs: [frontend, backend] steps: - name: Checkout repository @@ -116,5 +117,5 @@ jobs: - name: Build frontend image run: docker build -t queuenova-frontend ./frontend - - name: Build backend image - run: docker build -t queuenova-backend ./backend \ No newline at end of file +# - name: Build backend image +# run: docker build -t queuenova-backend ./backend \ No newline at end of file