Fix Actions and update PHP matrix #8
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: | |
pull_request: | |
branches: | |
- 'master' | |
push: | |
branches: | |
- '**' | |
jobs: | |
static_analysis: | |
name: Static analysis with phpstan | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '7.4' | |
tools: phpstan, composer:v2 | |
- run: phpstan analyse | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
php: ['7.4', '8.0', '8.1', '8.2'] | |
name: PHP ${{ matrix.php }} tests | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup ActiveMq | |
run: docker run --rm -d --name stomp-activemq -v ${{ github.workspace }}/travisci/conf/amq/activemq.xml:/opt/activemq/conf/activemq.xml:ro -p 127.0.0.1:61010:61010 rmohr/activemq:${{ vars.ACTIVEMQ_IMAGE_TAG }} | |
- name: Setup Apollo | |
run: docker run --rm -d --name stomp-apollo -p 127.0.0.1:61020:61020 finsn/stomp-apollo:${{ vars.APOLLO_IMAGE_TAG }} | |
- name: Setup Artemis | |
run: docker run --rm -d --name stomp-artemis -p 127.0.0.1:61040:61613 -e DISABLE_SECURITY=true -v ${{ github.workspace }}/travisci/conf/artemis/broker-00.xml:/var/lib/artemis/etc-override/broker-00.xml:ro vromero/activemq-artemis:${{ vars.ARTEMIS_IMAGE_TAG }} | |
- name: Setup RabbitMq | |
run: docker run --rm -d --name stomp-rabbit -p 127.0.0.1:61030:61030 -v ${{ github.workspace }}/travisci/conf/rabbit/:/etc/rabbitmq/ rabbitmq:${{ vars.RABBITMQ_IMAGE_TAG }} | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: xdebug | |
ini-values: error_reporting=E_ALL | |
tools: composer:v2 | |
- name: Get composer cache directory | |
id: composercache | |
run: | | |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composercache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-progress | |
- name: Run tests | |
run: vendor/bin/phpunit --debug |