Skip to content

Merge pull request #41 from danieltakahashi/docs/readme_update_suppor… #100

Merge pull request #41 from danieltakahashi/docs/readme_update_suppor…

Merge pull request #41 from danieltakahashi/docs/readme_update_suppor… #100

Workflow file for this run

name: Tests
on:
pull_request:
branches:
- main
push:
branches:
- main
pull_request_target:
types: [labeled]
jobs:
build:
if: >-
( github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.fork == true ) ||
( github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false ) ||
( !(startsWith(github.event_name, 'pull_request')) )
runs-on: ubuntu-latest
strategy:
matrix:
node: ['7.4', '8.0', '8.1']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Composer validate
run: composer validate
- name: Composer Install
run: composer install --dev --no-interaction --no-ansi --prefer-dist --no-suggest
- name: PSR12 check
run: make psr12-check
- name: Psalm check
run: make psalm
- name: Setup PHP with pre-release PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.node }}
extensions: xdebug-beta
- name: Run tests
run: make tests-coverage
- name: Changes path in output files after tests with coverage to relative github actions path
run: |
pwd
cat ./tests/_output/*
sed -i 's!/home/runner/work/autogenerated-messages/autogenerated-messages/!/github/workspace/!g' $(find ./tests/_output/ -type f) | true
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.organization=setnemo
-Dsonar.host.url=https://sonarcloud.io/
-Dsonar.projectKey=setnemo_autogenerated-messages
-Dsonar.exlusions=vendor