|
| 1 | +name: composer dependency analyser |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + paths: &paths |
| 6 | + - 'src/**' |
| 7 | + - 'tests/**' |
| 8 | + - '.github/workflows/composer-dependency-analyser.yml' |
| 9 | + - 'composer.json' |
| 10 | + - 'composer-dependency-analyser.php' |
| 11 | + push: |
| 12 | + branches: ['master'] |
| 13 | + paths: *paths |
| 14 | + |
| 15 | +permissions: |
| 16 | + contents: read |
| 17 | + |
| 18 | +concurrency: |
| 19 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 20 | + cancel-in-progress: true |
| 21 | + |
| 22 | +jobs: |
| 23 | + composer-dependency-analyser: |
| 24 | + name: PHP ${{ matrix.php }} |
| 25 | + runs-on: windows-latest |
| 26 | + strategy: |
| 27 | + matrix: |
| 28 | + php: |
| 29 | + - 7.4 |
| 30 | + |
| 31 | + steps: |
| 32 | + - name: Checkout |
| 33 | + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 34 | + with: |
| 35 | + persist-credentials: false |
| 36 | + |
| 37 | + - name: Install PHP |
| 38 | + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 |
| 39 | + with: |
| 40 | + php-version: ${{ matrix.php }} |
| 41 | + tools: composer:v2 |
| 42 | + coverage: none |
| 43 | + |
| 44 | + - name: Choco install 7zip |
| 45 | + uses: crazy-max/ghaction-chocolatey@dfdcf5bba9c0a16358a21c13a06ec5c89024b3ac # v4.1.0 |
| 46 | + with: |
| 47 | + args: install 7zip |
| 48 | + |
| 49 | + - uses: suisei-cn/actions-download-file@9f75b8c2dad5ccced7509c44a3b881c5613abde2 # v1.6.1 |
| 50 | + id: wincache |
| 51 | + name: Download WinCache |
| 52 | + with: |
| 53 | + url: "https://downloads.sourceforge.net/project/wincache/development/wincache-2.0.0.8-dev-7.4-nts-vc15-x64.exe" |
| 54 | + target: C:\tools\php\ext |
| 55 | + |
| 56 | + - name: Install WinCache |
| 57 | + run: | |
| 58 | + cd C:\tools\php\ext |
| 59 | + 7z e -y wincache-2.0.0.8-dev-7.4-nts-vc15-x64.exe |
| 60 | +
|
| 61 | + - name: Update php.ini |
| 62 | + run: | |
| 63 | + cd C:\tools\php |
| 64 | + echo extension=php_wincache.dll >> php.ini |
| 65 | + echo wincache.enablecli=1 >> php.ini |
| 66 | +
|
| 67 | + - name: Install Composer dependencies |
| 68 | + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 |
| 69 | + |
| 70 | + - name: Check dependencies |
| 71 | + run: vendor/bin/composer-dependency-analyser |
0 commit comments