Skip to content

chore(deps): bump the github-actions group with 2 updates #33

chore(deps): bump the github-actions group with 2 updates

chore(deps): bump the github-actions group with 2 updates #33

Workflow file for this run

name: Drupal Module
on:
pull_request:
paths:
- "**/*.php"
- "**/*.yml"
- "composer.json"
- "tests/**"
- ".github/workflows/drupal-module.yml"
push:
paths:
- "**/*.php"
- "**/*.yml"
- "composer.json"
- "tests/**"
- ".github/workflows/drupal-module.yml"
jobs:
phpunit:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
permissions:
contents: read
id-token: write
strategy:
fail-fast: false
matrix:
include:
- drupal: "^10"
php: "8.2"
experimental: false
coverage: false
- drupal: "^11"
php: "8.3"
experimental: false
coverage: true
- drupal: "^11"
php: "8.4"
experimental: false
coverage: false
- drupal: "^11"
php: "8.5"
experimental: true
coverage: false
env:
SIMPLETEST_BASE_URL: "http://127.0.0.1"
SIMPLETEST_DB: "sqlite://localhost/sites/default/files/db.sqlite"
steps:
- uses: actions/checkout@v6
- uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
tools: composer:v2
extensions: gd
coverage: pcov
- name: Create Drupal project
run: composer create-project drupal/recommended-project:${{ matrix.drupal }} drupal --no-interaction --prefer-dist
- name: Install dependency modules
run: |
cd drupal
composer require drupal/jsonapi_frontend:^1 --no-interaction --prefer-dist -W
- name: Install module from this repo
run: |
mkdir -p drupal/web/modules/contrib/jsonapi_frontend_menu
rsync -a --delete \
--exclude ".git" \
--exclude "drupal" \
--exclude ".github" \
./ drupal/web/modules/contrib/jsonapi_frontend_menu/
- name: Install Drupal test dependencies
run: |
cd drupal
composer require --dev drupal/core-dev:${{ matrix.drupal }} --no-interaction --prefer-dist -W
- name: Prepare test directories
run: |
mkdir -p drupal/web/sites/default/files
mkdir -p drupal/web/sites/simpletest/browser_output
chmod -R 777 drupal/web/sites/default/files
chmod -R 777 drupal/web/sites/simpletest/browser_output
- name: Run PHPUnit
if: ${{ !matrix.coverage }}
run: |
cd drupal/web
../vendor/bin/phpunit -c core modules/contrib/jsonapi_frontend_menu/tests
- name: Run PHPUnit (coverage)
if: ${{ matrix.coverage }}
run: |
cd drupal/web
../vendor/bin/phpunit -c core modules/contrib/jsonapi_frontend_menu/tests \
--coverage-clover "$GITHUB_WORKSPACE/coverage.xml" \
--coverage-filter modules/contrib/jsonapi_frontend_menu
- name: Upload coverage artifact
if: ${{ matrix.coverage }}
uses: actions/upload-artifact@v6
with:
name: coverage-jsonapi_frontend_menu
path: coverage.xml
if-no-files-found: error
- name: Upload coverage to Codecov
if: ${{ matrix.coverage }}
continue-on-error: true
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de
with:
use_oidc: true
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
flags: phpunit,drupal
fail_ci_if_error: false
verbose: true