fix: comparisons for discharge/abrogation dates #488
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: PHP Static Analysis with Psalm | |
# Only run this action on pull requests (creation, synchronisation, and reopening). | |
on: [pull_request] | |
# Cancel running jobs that have become stale through updates to the ref (e.g., pushes to a pull request). | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
psalm: | |
name: Psalm | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout head branch | |
uses: actions/checkout@v4 | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.3' | |
extensions: calendar, curl, exif, gd, intl, opcache, pgsql, pdo_mysql, pdo_pgsql, zip, imagick, memcached, xdebug | |
- name: Extract configuration files | |
run: | | |
cp config/autoload/doctrine.local.development.php.dist config/autoload/doctrine.local.php | |
cp config/autoload/laminas-developer-tools.local.php.dist config/autoload/laminas-developer-tools.local.php | |
cp config/autoload/local.development.php.dist config/autoload/local.php | |
- name: Check out main | |
run: | | |
git fetch --all | |
git update-ref refs/heads/temp-psalmpr refs/remotes/origin/main | |
git checkout --detach temp-psalmpr | |
- name: Install dependencies with Composer | |
uses: ramsey/composer-install@v3 | |
- name: Load environment variables | |
uses: c-py/action-dotenv-to-setenv@v3 | |
with: | |
env-file: .env.dist | |
- name: Generate Psalm Baseline | |
run: | | |
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?><files/>" > psalm/psalm-baseline.xml | |
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?><files/>" > psalm/psalm-baseline-pr.xml | |
vendor/bin/psalm --set-baseline=psalm/psalm-baseline-pr.xml --no-diff --no-cache --no-progress || true | |
- name: Check out new branch | |
run: | | |
git checkout -- psalm/psalm-baseline.xml | |
git checkout --theirs -- config/modules.config.php | |
git checkout - | |
- name: Install dependencies with Composer | |
uses: ramsey/composer-install@v3 | |
- name: Load environment variables | |
uses: c-py/action-dotenv-to-setenv@v3 | |
with: | |
env-file: .env.dist | |
- name: Run Psalm | |
run: | | |
vendor/bin/psalm --no-diff --no-cache --no-progress --output-format=github |