mjml-typo3/.github/workflows/ci.yaml
Daniel Siepmann c45dee45b0
[TASK] Update MJML and clean up parts of the extension for new release (#31)
Use one functional test to ensure everything works,
no unit tests with heavy mocking.

Update mjml to fix security issues and allow new options.

Provide GitHub Actions. This is a public extension with free minutes
which should ensure that existing setup still works.
2022-09-15 15:58:08 +02:00

100 lines
2.3 KiB
YAML

name: CI
on:
push:
branches:
- main
pull_request:
jobs:
check-composer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: none
tools: composer:v2
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Validate composer.json
run: composer validate
php-linting:
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- 8.1
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
coverage: none
tools: composer:v2
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: PHP lint
run: "find *.php Classes Configuration Tests -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l"
coding-guideline:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
coverage: none
tools: composer:v2
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Coding Guideline
run: ./vendor/bin/phpcs
tests:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- php-version: '8.1'
typo3-version: '^11.5'
steps:
- uses: actions/checkout@v2
- name: Install NodeJS
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
coverage: none
tools: composer:v2
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install PHP dependencies with expected TYPO3 version
run: composer require --prefer-dist --no-progress "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-form:${{ matrix.typo3-version }}"
- name: Install npm dependencies
run: npm install
- name: PHPUnit Tests
run: ./vendor/bin/phpunit --testdox