From 5c8036a841cc173c027b72dea58f33ee84d3e3ab Mon Sep 17 00:00:00 2001 From: "Paragon Initiative Enterprises, LLC" Date: Fri, 19 Apr 2024 19:11:30 -0400 Subject: [PATCH] Update CI configuration, dependencies --- .github/workflows/ci.yml | 14 +++----------- .github/workflows/psalm.yml | 34 ++++++++++++++++++++++++++++++++++ composer.json | 2 +- 3 files changed, 38 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/psalm.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 486d244..8f0bd99 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: phpunit-versions: ['7.5.20'] steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -37,11 +37,11 @@ jobs: strategy: matrix: operating-system: ['ubuntu-latest'] - php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1'] + php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] phpunit-versions: ['latest'] steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -58,11 +58,3 @@ jobs: uses: php-actions/phpunit@v2 with: memory_limit: 256M - - - name: Install Psalm - if: contains(['7.4', '8.0], ${{ matrix.php-version }}) - run: composer require --dev vimeo/psalm:^4 - - - name: Static Analysis - if: contains(['7.4', '8.0], ${{ matrix.php-version }}) - run: composer static-analysis diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml new file mode 100644 index 0000000..f560011 --- /dev/null +++ b/.github/workflows/psalm.yml @@ -0,0 +1,34 @@ +name: Psalm + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + psalm: + name: Psalm on PHP ${{ matrix.php-versions }} + runs-on: ${{ matrix.operating-system }} + strategy: + matrix: + operating-system: ['ubuntu-latest'] + php-versions: ['8.3'] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + tools: psalm:4 + coverage: none + + - name: Install Composer dependencies + uses: "ramsey/composer-install@v1" + with: + composer-options: --no-dev + + - name: Static Analysis + run: psalm diff --git a/composer.json b/composer.json index 7bbc535..fe4ce98 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "ext-json": "*", "ext-openssl": "*", "paragonie/constant_time_encoding": "^1.0.4|^2", - "paragonie/sodium_compat": ">= 1.17 <2" + "paragonie/sodium_compat": "^1|^2" }, "require-dev": { "phpunit/phpunit": "^4|^5|^6|^7|^8|^9"