Add ereolen-homepage-url prop to all dpl-react apps #2245
Workflow file for this run
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
# These workflows takes care of various CI tests. | |
on: pull_request | |
name: CI Tests | |
env: | |
PHP_VERSION: 8.0 | |
COMPOSER_VERSION: v2 | |
jobs: | |
ValidateComposer: | |
name: Validate Composer | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PHP, with composer and extensions | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ env.PHP_VERSION }} | |
coverage: none | |
tools: composer:${{ env.COMPOSER_VERSION }} | |
- name: Validate composer.json | |
run: | | |
composer validate --no-check-all --no-check-publish | |
- name: Install Dependencies | |
run: | | |
composer install --no-interaction --no-progress | |
- name: Ensure install does not modify VCS | |
run: git diff --exit-code | |
Phpcs: | |
name: Check code style | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PHP, with composer and extensions | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ env.PHP_VERSION }} | |
tools: composer:${{ env.COMPOSER_VERSION }} | |
coverage: none | |
extensions: gd | |
- name: Install Dependencies | |
run: | | |
composer install --no-interaction --no-progress | |
- name: Run phpcs | |
uses: reload/action-phpcs@main | |
with: | |
reviewdog_token: ${{ secrets.GITHUB_TOKEN }} | |
Phpstan: | |
name: Analyse code using PHPStan | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PHP, with composer and extensions | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ env.PHP_VERSION }} | |
coverage: none | |
tools: composer:${{ env.COMPOSER_VERSION }} | |
- name: Install composer dependencies | |
run: | | |
composer install --no-interaction --no-progress | |
# Add vendor/bin to PATH for subsequent steps, see https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#adding-a-system-path | |
composer config bin-dir --absolute >> "${GITHUB_PATH}" | |
- name: PHPStan analyse | |
run: | | |
phpstan | |
PhpUnit: | |
name: Run PHP unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PHP, with composer and extensions | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ env.PHP_VERSION }} | |
tools: composer:${{ env.COMPOSER_VERSION }} | |
coverage: xdebug | |
extensions: gd | |
- name: Install Dependencies | |
run: | | |
composer install --no-interaction --no-progress | |
- name: Run PhpUnit | |
run: ./vendor/bin/phpunit --coverage-text | |
LightHouse: | |
name: Test site performance using Lighthouse | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Our Taskfile requires a proper checkout to function because of | |
# certain vars. | |
fetch-depth: 0 | |
- name: Install go-task | |
uses: arduino/setup-task@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup site | |
run: task ci:reset | |
- name: Run Lighthouse test | |
run: task ci:lighthouse | |
- name: Archive logs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: lighthouse-results | |
path: .lighthouseci | |
Pa11y: | |
name: Test accessibility using Pa11y | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Our Taskfile requires a proper checkout to function because of | |
# certain vars. | |
fetch-depth: 0 | |
- name: Install go-task | |
uses: arduino/setup-task@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup site | |
run: task ci:reset | |
- name: Run Pa11y | |
run: task ci:pa11y | |
- name: Archive screenshots | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pa11y-screenshots | |
path: pa11y/screenshots | |
Cypress: | |
name: Run Cypress functional tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Our Taskfile requires a proper checkout to function because of | |
# certain vars. | |
fetch-depth: 0 | |
- name: Install go-task | |
uses: arduino/setup-task@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup site | |
run: task ci:reset | |
- name: Run Cypress | |
run: task ci:cypress | |
- name: Archive videoes | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: cypress-videos | |
path: cypress/videos | |
- name: Archive screenshots | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: cypress-screenshots | |
path: cypress/screenshots | |
MarkdownLint: | |
name: Lint Markdown | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# git with HTTP authentication provides an easy way for us to install | |
# unreleased commits of NPM projects. Currently: Pa11yCI | |
- name: Reconfigure git to use HTTP authentication | |
run: git config --global url."https://${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf ssh://[email protected]/ | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Install problem matcher | |
uses: xt0rted/markdownlint-problem-matcher@v2 | |
- name: Lint Markdown | |
run: npx markdownlint-cli2 | |
EslintDrupal: | |
name: Lint Drupal assets | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# git with HTTP authentication provides an easy way for us to install | |
# unreleased commits of NPM projects. Currently: Pa11yCI | |
- name: Reconfigure git to use HTTP authentication | |
run: git config --global url."https://${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf ssh://[email protected]/ | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Run ESLint | |
run: npx eslint web -c .eslintrc.json | |
EslintCypress: | |
name: Lint Cypress tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# git with HTTP authentication provides an easy way for us to install | |
# unreleased commits of NPM projects. Currently: Pa11yCI | |
- name: Reconfigure git to use HTTP authentication | |
run: git config --global url."https://${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf ssh://[email protected]/ | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Run ESLint | |
run: npx eslint cypress -c cypress/.eslintrc.json | |
CheckOpenApiSpec: | |
name: Check OpenAPI specification | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Our Taskfile requires a proper checkout to function because of | |
# certain vars. | |
fetch-depth: 0 | |
- name: Install go-task | |
uses: arduino/setup-task@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup site | |
run: task ci:reset | |
- name: Validate specification | |
run: task ci:openapi:validate | |
- name: Download current specification | |
run: task ci:openapi:download | |
- name: Ensure specification has not drifted | |
run: git diff --ignore-space-at-eol --exit-code openapi.json |