File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Drupal Module
2+
3+ on :
4+ pull_request :
5+ paths :
6+ - " **/*.php"
7+ - " **/*.yml"
8+ - " composer.json"
9+ - " tests/**"
10+ - " .github/workflows/drupal-module.yml"
11+ push :
12+ paths :
13+ - " **/*.php"
14+ - " **/*.yml"
15+ - " composer.json"
16+ - " tests/**"
17+ - " .github/workflows/drupal-module.yml"
18+
19+ jobs :
20+ phpunit :
21+ runs-on : ubuntu-latest
22+ strategy :
23+ fail-fast : false
24+ matrix :
25+ include :
26+ - drupal : " ^10"
27+ php : " 8.2"
28+ - drupal : " ^11"
29+ php : " 8.3"
30+
31+ env :
32+ SIMPLETEST_BASE_URL : " http://127.0.0.1"
33+ SIMPLETEST_DB : " sqlite://localhost/sites/default/files/db.sqlite"
34+
35+ steps :
36+ - uses : actions/checkout@v4
37+
38+ - uses : shivammathur/setup-php@v2
39+ with :
40+ php-version : " ${{ matrix.php }}"
41+ tools : composer:v2
42+ extensions : gd
43+
44+ - name : Create Drupal project
45+ run : composer create-project drupal/recommended-project:${{ matrix.drupal }} drupal --no-interaction --prefer-dist
46+
47+ - name : Install module from this repo
48+ run : |
49+ mkdir -p drupal/web/modules/contrib/jsonapi_frontend
50+ rsync -a --delete \
51+ --exclude ".git" \
52+ --exclude "drupal" \
53+ --exclude ".github" \
54+ ./ drupal/web/modules/contrib/jsonapi_frontend/
55+
56+ - name : Install Drupal test dependencies
57+ run : |
58+ cd drupal
59+ composer require --dev drupal/core-dev:${{ matrix.drupal }} --no-interaction --prefer-dist -W
60+
61+ - name : Prepare test directories
62+ run : |
63+ mkdir -p drupal/web/sites/default/files
64+ mkdir -p drupal/web/sites/simpletest/browser_output
65+ chmod -R 777 drupal/web/sites/default/files
66+ chmod -R 777 drupal/web/sites/simpletest/browser_output
67+
68+ - name : Run PHPUnit
69+ run : |
70+ cd drupal/web
71+ ../vendor/bin/phpunit -c core modules/contrib/jsonapi_frontend/tests
72+
You can’t perform that action at this time.
0 commit comments