Update dependencies to address security advisories, #PG-5387 #36
Workflow file for this run
This file contains hidden or 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: PHPStan check | |
| on: pull_request | |
| permissions: | |
| actions: read | |
| checks: read | |
| contents: read | |
| deployments: none | |
| issues: read | |
| packages: none | |
| pull-requests: read | |
| repository-projects: none | |
| security-events: none | |
| statuses: read | |
| env: | |
| PLUGIN_NAME: GoogleAnalyticsImporter | |
| DEPENDENT_PLUGINS: matomo-org/plugin-MarketingCampaignsReporting innocraft/plugin-Funnels innocraft/plugin-ConnectAccounts | |
| jobs: | |
| phpstan: | |
| name: PHPStan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: false | |
| persist-credentials: false | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| # 8.2 rather than 7.2: the ConnectAccounts dependency uses PHP 8 | |
| # attribute syntax, which fatals when loaded on 7.2. The analysis | |
| # level stays PHP 7.2 via phpVersion in phpstan.neon. | |
| php-version: '8.2' | |
| - name: Check out github-action-tests repository | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: matomo-org/github-action-tests | |
| ref: main | |
| path: github-action-tests | |
| persist-credentials: false | |
| - name: checkout matomo for plugin builds | |
| shell: bash | |
| run: ${{ github.workspace }}/github-action-tests/scripts/bash/checkout_matomo.sh | |
| env: | |
| PLUGIN_NAME: ${{ env.PLUGIN_NAME }} | |
| WORKSPACE: ${{ github.workspace }} | |
| ACTION_PATH: ${{ github.workspace }}/github-action-tests | |
| MATOMO_TEST_TARGET: maximum_supported_matomo | |
| - name: prepare setup | |
| shell: bash | |
| run: | | |
| cd ${{ github.workspace }}/matomo | |
| echo -e "composer install" | |
| composer install --ignore-platform-reqs | |
| - name: checkout additional plugins | |
| if: ${{ env.DEPENDENT_PLUGINS != '' }} | |
| shell: bash | |
| working-directory: ${{ github.workspace }}/matomo | |
| run: ${{ github.workspace }}/github-action-tests/scripts/bash/checkout_dependent_plugins.sh | |
| env: | |
| DEPENDENT_PLUGINS: ${{ env.DEPENDENT_PLUGINS }} | |
| GITHUB_USER_TOKEN: ${{ secrets.TESTS_ACCESS_TOKEN || secrets.GITHUB_TOKEN }} | |
| - name: "Restore result cache" | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: /tmp/phpstan # same as in phpstan.neon | |
| key: "phpstan-result-cache-${{ github.run_id }}" | |
| restore-keys: | | |
| phpstan-result-cache- | |
| - name: PHPStan whole repo | |
| id: phpstan-all | |
| run: cd ${{ github.workspace }}/matomo && composer run phpstan -- -vvv -c plugins/${{ env.PLUGIN_NAME }}/phpstan.neon | |
| - name: "Save result cache" | |
| uses: actions/cache/save@v4 | |
| if: ${{ !cancelled() }} | |
| with: | |
| path: /tmp/phpstan # same as in phpstan.neon | |
| key: "phpstan-result-cache-${{ github.run_id }}" |