Skip to content

Commit

Permalink
Add a DDEV script for running PHPUnit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobefu committed May 18, 2024
1 parent c0edf17 commit 2107c14
Show file tree
Hide file tree
Showing 4 changed files with 4,310 additions and 690 deletions.
10 changes: 10 additions & 0 deletions .ddev/commands/web/phpunit
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

if [ -f ./db/db.sqlite ]; then
rm ./db/db.sqlite
fi

touch ./db/db.sqlite

export DATABASE_URL="sqlite:///%kernel.project_dir%/db/db.sqlite"
./vendor/bin/phpunit -c web/core/phpunit.xml.dist web/profiles/contrib/nuxtify
2 changes: 1 addition & 1 deletion .github/workflows/drupal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ jobs:
- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
DATABASE_URL: sqlite:///%kernel.project_dir%/data/database.sqlite
run: vendor/bin/phpunit
run: vendor/bin/phpunit .
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Quickly build a decoupled Drupal site with Nuxt 3 and GraphQL",
"type": "project",
"license": "GPL-2.0-or-later",
"homepage": "https://www.drupal.org/project/drupal",
"homepage": "https://github.com/Nuxtify-drupal/Nuxtify",
"authors": [
{
"name": "Connor van Spronssen",
Expand All @@ -25,6 +25,7 @@
"drupal/core-recommended": "^10"
},
"require-dev": {
"drupal/core-dev": "^10.2",
"drush/drush": "^12.4",
"phpunit/phpunit": "^9.6"
},
Expand Down
Loading

0 comments on commit 2107c14

Please sign in to comment.