Skip to content

Commit

Permalink
fix: CI
Browse files Browse the repository at this point in the history
  • Loading branch information
abourtnik committed Dec 7, 2023
1 parent f34eb0c commit f7c7ced
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,28 @@ jobs:
test:
name: Test
runs-on: ubuntu-latest
env:
APP_URL: "http://127.0.0.1:8000"
DB_USERNAME: root
DB_PASSWORD: root
MAIL_MAILER: log
steps:
- uses: actions/checkout@master

- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'

- name: Run composer install
run: composer install -n --prefer-dist

- name: Prepare Laravel Application
- name: Prepare The Environment
run: cp .env.example .env
- name: Create Database
run: |
cp .env.example .env
php artisan key:generate
sudo systemctl start mysql
mysql --user="root" --password="root" -e "CREATE DATABASE \`my-database\` character set UTF8mb4 collate utf8mb4_bin;"
- name: Install Composer Dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Generate Application Key
run: php artisan key:generate
- name: Run Laravel Server
run: php artisan serve --no-reload &
- name: Run Test
run: php artisan test --stop-on-failure --env=testing

0 comments on commit f7c7ced

Please sign in to comment.