Skip to content

Commit

Permalink
Add new workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MuchQuak committed Feb 4, 2025
1 parent 6fb374a commit f83f0c2
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_CONNECTION=mariadb
DB_HOST=mariadb
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Tests

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
laravel-tests:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"

# - name: Install Playwright Browsers
# run: npx playwright install --with-deps
- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache

- name: 'Build Docker Resources'
run : |
echo --- Building and Starting up docker ---
WWWUSER="1000" WWWGROUP="1000" DB_CONNECTION="mariadb" DB_HOST="mariadb" DB_PORT="3306" DB_DATABASE="symbdb" DB_USERNAME="root" DB_PASSWORD="buildpassword" FORWARD_DB_PORT=3306 docker compose up -d
sleep 15
echo --- Containers Up ---
- name: Execute tests (Unit and Feature tests) via PHPUnit/Pest
run: php artisan test

#- name: Run Playwright tests
#run: npx playwright test

0 comments on commit f83f0c2

Please sign in to comment.