Skip to content

feat: operation

feat: operation #201

Workflow file for this run

name: CI
on:
push: ~
pull_request: ~
workflow_dispatch: ~
jobs:
tests:
runs-on: ubuntu-latest
name: CI - PHP ${{ matrix.php }}, Dependencies ${{ matrix.dependencies }}, Schema ${{ matrix.schema }}
env:
ASYNCAPI_VERSION: ${{ matrix.schema }}
strategy:
matrix:
php: [8.2, 8.3]
schema: [3.0.0, 2.6.0]
dependencies: [lowest, highest]
include:
-
php: 8.2
dependencies: lowest
coveralls: true
steps:
- # Copies the repository files to the Action Runner
name: Checkout Repository
uses: actions/checkout@v3
- # Installs PHP and other necessary tools
name: Setup PHP
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php }}
- # Installs and caches PHP dependencies
name: Install Dependencies
uses: ramsey/[email protected]
with:
dependency-versions: ${{ matrix.dependencies }}
- # Validates composer.json structure and required fields
name: Validate composer.json
run: composer validate --ansi --strict --no-check-publish
- # Runs code quality tools, like phpstan etc.
name: Run Code Quality Tools
run: composer analyse
- # Runs code architecture tests
name: Run Deptrac Tests
run: composer deptrac
- # Runs unit and integration tests, like phpspec, phpunit etc.
name: Run Tests
run: composer coverage
- # Run AsyncAPI Validation
name: AsyncAPI Validation
run: |
docker run --rm -v $(pwd):/app asyncapi/cli:1.4.4 validate /app/var/${{ matrix.schema }}/asyncapi.yaml
docker run --rm -v $(pwd):/app asyncapi/cli:1.4.4 validate /app/var/${{ matrix.schema }}/asyncapi.json
- # Upload Coverage to Coveralls
name: Coveralls
if: ${{ matrix.coveralls && github.event_name == 'pull_request' }}
uses: coverallsapp/[email protected]
with:
file: var/coverage/clover.xml