From 82c371b5194d495878c34ed13e21fb1ad78fe5e6 Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 28 Feb 2022 17:07:19 +0100 Subject: [PATCH] fix the update-baseline-workflow Signed-off-by: szaimen --- .github/workflows/psalm-update-baseline.yml | 20 +++++++------------- php/composer.json | 6 +++++- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/psalm-update-baseline.yml b/.github/workflows/psalm-update-baseline.yml index cf26090c..c9616a1c 100644 --- a/.github/workflows/psalm-update-baseline.yml +++ b/.github/workflows/psalm-update-baseline.yml @@ -11,8 +11,6 @@ jobs: steps: - uses: actions/checkout@v2 - with: - submodules: true - name: Set up php8.0 uses: shivammathur/setup-php@v2 @@ -21,20 +19,16 @@ jobs: extensions: apcu coverage: none - - name: change directory - run: cd php - - - name: Composer install - run: composer install - - - name: Psalm - run: composer run psalm -- --monochrome --no-progress --output-format=text --update-baseline - continue-on-error: true - - - name: Reset composer + - name: Run script run: | + set -x + cd php + composer global require vimeo/psalm --prefer-dist --no-progress --dev + composer install + composer run psalm -- --monochrome --no-progress --output-format=text --update-baseline git clean -f lib/composer git checkout composer.json composer.lock lib/composer + continue-on-error: true - name: Create Pull Request uses: peter-evans/create-pull-request@v3 diff --git a/php/composer.json b/php/composer.json index 4641bd50..53de2abf 100644 --- a/php/composer.json +++ b/php/composer.json @@ -17,5 +17,9 @@ "slim/twig-view": "^3.2", "slim/csrf": "^1.2", "ext-apcu": "*" - } + }, + "scripts": { + "psalm": "psalm --threads=1", + "psalm:update-baseline": "psalm --threads=1 --update-baseline" + } }