Add Dependabot configuration for GitHub Actions updates #158
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: Test | |
| on: | |
| push: | |
| paths-ignore: | |
| - '**.md' | |
| schedule: | |
| - cron: '30 0 * * *' | |
| # │ │ │ │ │───────────── day of the week (0 - 6 or SUN-SAT) | |
| # │ │ │ │───────────── month (1 - 12 or JAN-DEC) | |
| # │ │ │───────────── day of the month (1 - 31) | |
| # │ │───────────── hour (0 - 23) | |
| # │──────────── minute (0 - 59) | |
| env: | |
| CACHE_DIR: 'C:\Downloads' | |
| INSTALL_DIR: 'C:\tools' | |
| defaults: | |
| run: | |
| shell: powershell | |
| jobs: | |
| test: | |
| name: "PHP v${{ matrix.php }} (${{ matrix.ts }}) ${{ matrix.arch }} - ${{ matrix.msvc }}" | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: win2016-php74-nts-x64-vc15 | |
| os: windows-2016 | |
| php: '7.4' | |
| ts: 'nts' | |
| arch: 'x64' | |
| msvc: 'vc15' | |
| - name: win2019-php80-nts-x64-vs16 | |
| os: windows-2019 | |
| php: '8.0' | |
| ts: 'nts' | |
| arch: 'x64' | |
| msvc: 'vs16' | |
| steps: | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: psr, zip, mysqli | |
| ini-values: >- | |
| variables_order=EGPCS, | |
| enable_dl=On, | |
| allow_url_fopen=On, | |
| error_reporting=-1, | |
| memory_limit=1G, | |
| date.timezone=UTC, | |
| env: | |
| PHPTS: ${{ matrix.ts }} | |
| - name: Checkout Code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 1 | |
| - name: Prepare | |
| run: | | |
| if (-not (Test-Path "${{ env.CACHE_DIR }}")) { mkdir "${{ env.CACHE_DIR }}" } | |
| if (-not (Test-Path "${{ env.INSTALL_DIR }}")) { mkdir "${{ env.INSTALL_DIR }}" } | |
| - name: Setup PHP SDK and Developer Pack | |
| uses: ./ | |
| with: | |
| php_version: ${{ matrix.php }} | |
| ts: ${{ matrix.ts }} | |
| msvc: ${{ matrix.msvc }} | |
| arch: ${{ matrix.arch }} | |
| install_dir: ${{ env.INSTALL_DIR }} | |
| cache_dir: ${{ env.CACHE_DIR }} | |
| - name: Tests | |
| run: | | |
| $exitCode = 0 | |
| Write-Output "::group::Check directories" | |
| if (Test-Path "${{ env.INSTALL_DIR }}\php-sdk") { | |
| Write-Output "PHP SDK installed: ${{ env.INSTALL_DIR }}\php-sdk" | |
| } else { | |
| Write-Output "PHP SDK not exists" | |
| $exitCode = 1 | |
| } | |
| if (Test-Path "${{ env.INSTALL_DIR }}\php-devpack") { | |
| Write-Output "PHP Developer Pack installed: ${{ env.INSTALL_DIR }}\php-devpack" | |
| } else { | |
| Write-Output "PHP Developer Pack not exists" | |
| $exitCode = 1 | |
| } | |
| Write-Output "::endgroup::" | |
| exit $exitCode |