|
6 | 6 |
|
7 | 7 | permissions: |
8 | 8 | contents: read |
9 | | - pages: write |
10 | | - id-token: write |
11 | 9 |
|
12 | 10 | jobs: |
13 | 11 | unit-tests: |
14 | | - name: PHPUnit tests + cov. (PHP ${{ matrix.php }}) |
| 12 | + name: PHPUnit tests (PHP ${{ matrix.php }}) |
15 | 13 | runs-on: ubuntu-latest |
16 | 14 | strategy: |
17 | 15 | matrix: |
|
23 | 21 | uses: shivammathur/setup-php@v2 |
24 | 22 | with: |
25 | 23 | php-version: ${{ matrix.php }} |
26 | | - coverage: xdebug |
27 | 24 | - run: ./composer.phar install -n --no-progress -o |
28 | | - - run: ./composer.phar test+coverage |
29 | | - - name: 'Setup Pages' |
30 | | - uses: actions/configure-pages@v5 |
31 | | - - name: 'Upload results (PHP ${{ matrix.php }})' |
32 | | - uses: actions/upload-pages-artifact@v3 |
33 | | - with: |
34 | | - path: 'tests-output/coverage' |
35 | | - name: coverage-php-${{ matrix.php }} |
36 | | - deploy-pages: |
37 | | - name: Deploy coverage reports to Pages |
38 | | - runs-on: ubuntu-latest |
39 | | - needs: unit-tests |
40 | | - environment: |
41 | | - name: github-pages |
42 | | - url: '${{ steps.deployment.outputs.page_url }}coverage/php-8.5/html/' |
43 | | - steps: |
44 | | - - name: 'Checkout (for repo metadata)' |
45 | | - uses: actions/checkout@v4 |
46 | | - - name: 'Download artifacts' |
47 | | - uses: actions/download-artifact@v4 |
48 | | - with: |
49 | | - path: artifacts |
50 | | - - name: 'Arrange artifacts into subdirectories' |
51 | | - run: | |
52 | | - set -e |
53 | | - mkdir -p site/coverage |
54 | | - for af in artifacts/coverage-* ; do |
55 | | - a=$(basename "$af") |
56 | | - mv "$af" "site/coverage/${a#coverage-}" |
57 | | - done |
58 | | - - name: 'Upload site artifact' |
59 | | - uses: actions/upload-pages-artifact@v3 |
60 | | - with: |
61 | | - path: site |
62 | | - name: site |
63 | | - - name: 'Deploy to Pages' |
64 | | - id: deployment |
65 | | - uses: actions/deploy-pages@v4 |
66 | | - with: |
67 | | - artifact_name: site |
| 25 | + - run: ./composer.phar test |
68 | 26 | static-analysis: |
69 | 27 | name: PHPStan checks (PHP ${{ matrix.php }}) |
70 | 28 | runs-on: ubuntu-latest |
|
0 commit comments