Allow non-direct (i.e. transitive) subclasses of TypedEndpoint #152
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
name: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
run-tests: | |
strategy: | |
matrix: | |
# see https://www.php.net/supported-versions.php | |
php-version: ['8.2'] | |
name: Tests (PHP ${{ matrix.php-version }}) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache composer dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install composer dependencies | |
run: composer install --prefer-dist | |
- name: Get npm cache directory | |
id: npm-client-cache | |
run: | | |
echo "::set-output name=dir::$(npm config get cache)" | |
- name: Cache npm dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.npm-client-cache.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Cache other caches | |
uses: actions/cache@v3 | |
with: | |
path: | | |
*.cache | |
key: ${{ runner.os }}-other-${{ hashFiles('*.cache') }} | |
restore-keys: | | |
${{ runner.os }}-other- | |
- name: Install JavaScript dependencies | |
run: npm install | |
- name: PHP Code style check | |
run: composer fixdiff | |
- name: PHP Static Analysis | |
run: composer check | |
- name: Lint JavaScript & TypeScript | |
run: npm run lint | |
- name: Compile TypeScript | |
run: npm run build | |
- name: Jest Unit Tests | |
run: npm run test-ci | |
- name: PHP Unit Tests | |
run: composer unit_test; cat ./php-coverage/coverage.txt || echo "no coverage!" | |
- name: Example - Get npm cache directory | |
id: npm-example-cache | |
run: | | |
cd example; echo "::set-output name=dir::$(npm config get cache)" | |
- name: Example - Cache npm dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.npm-example-cache.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Example - Install JavaScript dependencies | |
run: cd example; npm install | |
- name: Example - Run Webpack | |
run: cd example; npm run webpack-build | |
- name: Lint JavaScript & TypeScript | |
run: npm run lint | |
- name: Example - Jest end-to-end Tests | |
run: cd example; npm run test-ci | |
- name: PHP Example Backend Tests | |
run: composer backend_tests |