added license in composer file #171
This file contains hidden or 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: Psalm Static Analysis | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
psalm: | |
name: Run Psalm | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.1 | |
tools: composer, psalm | |
- name: Install dependencies | |
run: composer install --no-progress --prefer-dist | |
- name: Run Psalm | |
run: vendor/bin/psalm --show-info=true --output-format=github | |
- name: Run Psalm | |
id: psalm | |
run: | | |
# Run Psalm and use tee to print output and save it to psalm.log | |
vendor/bin/psalm --no-cache --show-info=true --output-format=github | tee psalm.log || true | |
# If any warnings are found, print a message and exit with a failure code | |
if grep -q "warning" psalm.log; then | |
echo "Warnings detected in Psalm output. Failing build." | |
exit 1 | |
fi |