Skip to content

Workflow updates for Drupal 11 tests #273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: test_and_lint
env:
SIMPLETEST_DB: "sqlite://localhost//tmp/test.sqlite"
SIMPLETEST_BASE_URL: "http://127.0.0.1:8000"
SIMPLETEST_BASE_URL: "http://127.0.0.1:8000"
APIGEE_EDGE_AUTH_TYPE: ${{ secrets.APIGEE_EDGE_AUTH_TYPE }}
APIGEE_EDGE_ORGANIZATION: ${{ secrets.APIGEE_EDGE_ORGANIZATION }}
APIGEE_EDGE_USERNAME: ${{ secrets.APIGEE_EDGE_USERNAME }}
Expand All @@ -22,7 +22,7 @@ on:
jobs:
build:

runs-on: ubuntu-latest
runs-on: ubuntu-24.04

name: "PHP ${{ matrix.php-version }} | Drupal ${{ matrix.drupal-core }}"
strategy:
Expand All @@ -34,8 +34,13 @@ jobs:
- "8.3"
drupal-core:
# Should update the following as the minimum supported version from Drupal.org
- "10.2.x"
- "10.3.x"
- "11.1.x"
exclude:
- php-version: "8.1"
drupal-core: "11.1.x"
- php-version: "8.2"
drupal-core: "11.1.x"

steps:

Expand All @@ -51,7 +56,7 @@ jobs:
coverage: "xdebug"
php-version: "${{ matrix.php-version }}"
tools: composer:v2
extensions: dom, curl, libxml, mbstring, zip, pdo, mysql, pdo_mysql, bcmath, gd, exif, iconv, opcache, imagick
extensions: date, dom, filter, hash, json, curl, libxml, mbstring, zip, pdo, sqlite3, mysqli, mysql, pdo_mysql, bcmath, gd, exif, iconv, opcache, imagick, openssl

- name: Checkout Drupal core
run: |
Expand Down Expand Up @@ -111,17 +116,17 @@ jobs:
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional

- name: "Run PHPUnit Tests"
if: ${{ matrix.drupal-core != '10.2.x' || matrix.php-version != '8.2' }}
if: ${{ matrix.drupal-core != '10.3.x' || matrix.php-version != '8.2' }}
run: |
cd drupal
vendor/bin/phpunit -c core --verbose --color --group apigee_api_catalog --testsuite unit,kernel,functional,functional-javascript modules/contrib/apigee_api_catalog
vendor/bin/phpunit -c core --color --group apigee_api_catalog --testsuite unit,kernel,functional,functional-javascript modules/contrib/apigee_api_catalog

- name: "Run PHPUnit Tests with Code Coverage"
if: ${{ matrix.drupal-core == '10.2.x' && matrix.php-version == '8.2' }}
if: ${{ matrix.drupal-core == '10.3.x' && matrix.php-version == '8.2' }}
run: |
cd drupal
cp modules/contrib/apigee_api_catalog/phpunit.core.xml.dist core/phpunit.xml
vendor/bin/phpunit -c core --verbose --color --group apigee_api_catalog --testsuite unit,kernel,functional,functional-javascript --coverage-clover /tmp/coverage.xml modules/contrib/apigee_api_catalog
vendor/bin/phpunit -c core --color --group apigee_api_catalog --testsuite unit,kernel,functional,functional-javascript --coverage-clover /tmp/coverage.xml modules/contrib/apigee_api_catalog

- name: Artifacts
if: failure()
Expand All @@ -131,7 +136,7 @@ jobs:
path: drupal/sites/simpletest/browser_output/*

- name: Upload Coverage to Codecov
if: ${{ matrix.drupal-core == '10.2.x' && matrix.php-version == '8.2' }}
if: ${{ matrix.drupal-core == '10.3.x' && matrix.php-version == '8.2' }}
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
Loading