Skip to content

Commit

Permalink
Update workflow to use subpackage install. (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Apr 1, 2023
1 parent 546afd1 commit 08a0973
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 7 deletions.
54 changes: 48 additions & 6 deletions .github/workflows/static.yml
Expand Up @@ -23,9 +23,51 @@ name: static analysis

jobs:
psalm:
uses: yiisoft/actions/.github/workflows/psalm.yml@master
with:
os: >-
['ubuntu-latest']
php: >-
['8.0', '8.1', '8.2']
name: PHP ${{ matrix.php }}

env:
COMPOSER_ROOT_VERSION: dev-master

runs-on: ${{ matrix.os }}

strategy:
matrix:
os:
- ubuntu-latest

php:
- '8.0'
- '8.1'
- '8.2'

steps:
- name: Checkout.
uses: actions/checkout@v3

- name: Install PHP with extensions.
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
tools: composer:v2, cs2pr

- name: Update composer.
run: composer self-update

- name: Set environment variables pull request linux.
uses: yiisoft/actions/db/environment-linux@master

- name: Install db.
uses: yiisoft/actions/db/subpackage-install@master
with:
BRANCH_NAME: ${{ env.BRANCH_NAME }}
COMPOSER_ROOT_VERSION: ${{ env.COMPOSER_ROOT_VERSION }}
CURRENT_PACKAGE: db
FULL_BRANCH_NAME: ${{ env.FULL_BRANCH_NAME }}
WORK_PACKAGE_URL: ${{ env.WORK_PACKAGE_URL }}

- name: Install dependencies with composer.
run: composer update --no-interaction --no-progress --optimize-autoloader --ansi

- name: Static analysis.
run: vendor/bin/psalm --config=${{ inputs.psalm-config }} --shepherd --stats --output-format=github --php-version=${{ matrix.php }}
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -24,7 +24,7 @@
"ext-json": "*",
"ext-pdo": "*",
"psr/log": "^2.0|^3.0",
"yiisoft/db": "^3.0@dev",
"yiisoft/db": "@dev",
"yiisoft/json": "^1.0"
},
"require-dev": {
Expand Down

0 comments on commit 08a0973

Please sign in to comment.