Skip to content

[PoC] mutate CSP rules to allow vite-server #363

[PoC] mutate CSP rules to allow vite-server

[PoC] mutate CSP rules to allow vite-server #363

Workflow file for this run

name: tests
on: [ push, pull_request ]
jobs:
lint:
name: Source code linting
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v4
-
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: intl, mbstring, pdo_sqlite
ini-file: development
-
name: Validate composer.json
run: composer validate
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
-
name: Cache composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-
-
name: Install composer dependencies
run: composer install --prefer-dist --no-progress
-
name: PHP Linting
run: composer lint:php
-
name: Editorconfig Linting
run: composer lint:editorconfig
-
name: Phpstan Linting
run: composer lint:phpstan
test:
name: Testing (PHP ${{ matrix.php-version }}, TYPO3 ${{ matrix.typo3-version }})
needs: lint
strategy:
fail-fast: false
matrix:
php-version: [8.3, 8.2, 8.1]
typo3-version: ['^12', '^13', '^11']
exclude:
- php-version: 8.1
typo3-version: '^13'
uses: ./.github/workflows/_test.yaml
with:
php-version: ${{ matrix.php-version }}
typo3-version: ${{ matrix.typo3-version }}
unit-coverage-name: coverage-unit-${{ matrix.php-version }}-${{ matrix.typo3-version }}
functional-coverage-name: coverage-functional-${{ matrix.php-version }}-${{ matrix.typo3-version }}
test-doc:
name: Test documentation rendering
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Test if the documentation will render without warnings
run: |
mkdir -p Documentation-GENERATED-temp \
&& docker run --rm --pull always -v $(pwd):/project \
ghcr.io/typo3-documentation/render-guides:latest --config=Documentation --no-progress --fail-on-log
coverage:
needs:
- test
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v4
-
name: Download unit test coverage reports
uses: actions/download-artifact@v4
with:
name: coverage-unit-8.3-^12
-
name: Download functional test coverage reports
uses: actions/download-artifact@v4
with:
name: coverage-functional-8.3-^12
-
name: Upload coverage results to Coveralls
uses: paambaati/codeclimate-action@v5.0.0
env:
CC_TEST_REPORTER_ID: 32807026fddd031a98d1371e6a9360c6bd30f7be0d4bb9a5516a93cd748d9b34
with:
coverageLocations: |
clover.unit.xml:clover
clover.functional.xml:clover