-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
192677d
commit becaf92
Showing
6 changed files
with
88 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,11 +8,6 @@ APP_PORT=8000 | |
APP_DEBUG=true | ||
SSH_MUX_ENABLED=true | ||
|
||
# Selenium Driver URL for Dusk | ||
DUSK_DRIVER_URL=http://selenium:4444 | ||
[email protected] | ||
DUSK_PASSWORD=password | ||
|
||
# PostgreSQL Database Configuration | ||
DB_DATABASE=coolify | ||
DB_USERNAME=coolify | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
APP_ENV=production | ||
APP_NAME="Coolify Staging" | ||
APP_ID=development | ||
APP_KEY= | ||
APP_URL=http://localhost | ||
APP_PORT=8000 | ||
SSH_MUX_ENABLED=true | ||
|
||
# PostgreSQL Database Configuration | ||
DB_DATABASE=coolify | ||
DB_USERNAME=coolify | ||
DB_PASSWORD=password | ||
DB_HOST=localhost | ||
DB_PORT=5432 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Dusk | ||
on: | ||
push: | ||
branches: [ "next" ] | ||
jobs: | ||
dusk: | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
redis: | ||
image: redis | ||
env: | ||
REDIS_HOST: localhost | ||
REDIS_PORT: 6379 | ||
ports: | ||
- 6379:6379 | ||
options: >- | ||
--health-cmd "redis-cli ping" | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up PostgreSQL | ||
run: | | ||
sudo systemctl start postgresql | ||
sudo -u postgres psql -c "CREATE DATABASE coolify;" | ||
sudo -u postgres psql -c "CREATE USER coolify WITH PASSWORD 'password';" | ||
sudo -u postgres psql -c "ALTER ROLE coolify SET client_encoding TO 'utf8';" | ||
sudo -u postgres psql -c "ALTER ROLE coolify SET default_transaction_isolation TO 'read committed';" | ||
sudo -u postgres psql -c "ALTER ROLE coolify SET timezone TO 'UTC';" | ||
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE coolify TO coolify;" | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.2' | ||
- name: Copy .env | ||
run: cp .env.dusk.ci .env | ||
- name: Install Dependencies | ||
run: composer install --no-progress --prefer-dist --optimize-autoloader | ||
- name: Generate key | ||
run: php artisan key:generate | ||
- name: Install Chrome binaries | ||
run: php artisan dusk:chrome-driver --detect | ||
- name: Start Chrome Driver | ||
run: ./vendor/laravel/dusk/bin/chromedriver-linux & | ||
- name: Build assets | ||
run: npm install && npm run build | ||
- name: Run Laravel Server | ||
run: php artisan serve --no-reload & | ||
- name: Execute tests | ||
run: php artisan dusk | ||
- name: Upload Screenshots | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: screenshots | ||
path: tests/Browser/screenshots | ||
- name: Upload Console Logs | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: console | ||
path: tests/Browser/console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,18 +13,20 @@ class LoginTest extends DuskTestCase | |
* Login with the test user and assert that the user is redirected to the dashboard. | ||
* | ||
* @return void | ||
* | ||
* @throws Throwable | ||
*/ | ||
public function testLogin() | ||
{ | ||
$email = config('testing.dusk_test_email'); | ||
$password = config('testing.dusk_test_password'); | ||
$email = '[email protected]'; | ||
$password = 'password'; | ||
$this->browse(function (Browser $browser) use ($password, $email) { | ||
$browser->visit('/login') | ||
->type('email', $email) | ||
->type('password', $password) | ||
->press('Login') | ||
->assertPathIs('/'); | ||
->assertPathIs('/') | ||
->screenshot('login'); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.