diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index c3b9875..46bc1bd 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -7,14 +7,37 @@ jobs: name: Psalm runs-on: ubuntu-latest steps: + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + tools: composer:v2 + coverage: none + + - name: Install Psalm + run: | + composer global require vimeo/psalm --prefer-dist --ansi --no-interaction --no-cache --dev + PATH=$(composer global config bin-dir --absolute --quiet):$PATH + psalm --version + - name: Checkout code uses: actions/checkout@v2 - - name: Psalm - uses: docker://vimeo/psalm-github-actions - with: - security_analysis: true - report_file: results.sarif + - name: Configure environment + run: composer config platform.php '7.1' + + - name: Install dependencies + run: composer install --ansi --no-interaction --no-cache + + - name: Run Psalm + env: + GITHUB_REF: "" + GITHUB_REPOSITORY: "" + GITHUB_EVENT_PATH: "" + run: | + rm -rf .git + psalm --taint-analysis --show-info=true --output-format=github --report=results.sarif - name: Upload Security Analysis results to GitHub uses: github/codeql-action/upload-sarif@v1