Skip to content

Commit 47a5bfa

Browse files
committed
wip
1 parent 9b2f15e commit 47a5bfa

File tree

1 file changed

+0
-65
lines changed

1 file changed

+0
-65
lines changed

.github/workflows/deploy.yml

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -15,71 +15,6 @@ env:
1515
CONTAINER_NAME: laravel-app
1616

1717
jobs:
18-
test:
19-
runs-on: ubuntu-latest
20-
21-
services:
22-
mysql:
23-
image: mysql:8.0
24-
env:
25-
MYSQL_ROOT_PASSWORD: password
26-
MYSQL_DATABASE: laravel_test
27-
options: >-
28-
--health-cmd="mysqladmin ping"
29-
--health-interval=10s
30-
--health-timeout=5s
31-
--health-retries=3
32-
ports:
33-
- 3306:3306
34-
35-
steps:
36-
- name: Checkout code
37-
uses: actions/checkout@v4
38-
39-
- name: Setup PHP
40-
uses: shivammathur/setup-php@v2
41-
with:
42-
php-version: '8.2'
43-
extensions: mbstring, dom, fileinfo, mysql, redis
44-
45-
- name: Install dependencies
46-
run: |
47-
composer install --prefer-dist --no-progress --no-suggest
48-
npm install
49-
npm run build
50-
51-
- name: Setup environment
52-
run: |
53-
cp .env.example .env
54-
php artisan key:generate
55-
56-
- name: Run Pint (Code Style Check)
57-
run: ./vendor/bin/pint --preset psr12 --test
58-
59-
- name: Configure test database
60-
run: |
61-
echo "DB_CONNECTION=mysql" >> .env
62-
echo "DB_HOST=127.0.0.1" >> .env
63-
echo "DB_PORT=3306" >> .env
64-
echo "DB_DATABASE=laravel_test" >> .env
65-
echo "DB_USERNAME=root" >> .env
66-
echo "DB_PASSWORD=password" >> .env
67-
php artisan config:clear
68-
cat .env
69-
70-
- name: Wait for services
71-
run: |
72-
echo "Waiting for MySQL..."
73-
while ! mysqladmin ping -h"127.0.0.1" -P"3306" -u"root" -p"password" --silent; do
74-
sleep 2
75-
done
76-
echo "MySQL is ready!"
77-
78-
- name: Run tests
79-
run: |
80-
php artisan migrate --force
81-
php artisan test
82-
8318

8419
deploy:
8520
name: Deploy to ECS

0 commit comments

Comments
 (0)