File: test-slevomat-coding-standard.yml

package info (click to toggle)
php-phpstan-phpdoc-parser 2.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,496 kB
  • sloc: php: 21,857; makefile: 50; xml: 42; sh: 17
file content (74 lines) | stat: -rw-r--r-- 2,047 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Test Slevomat Coding Standard"

on:
  pull_request:
  push:
    branches:
      - "2.3.x"

jobs:
  tests:
    name: "Tests"
    runs-on: "ubuntu-latest"

    strategy:
      fail-fast: false
      matrix:
        php-version:
          - "7.4"
          - "8.0"
          - "8.1"
          - "8.2"
          - "8.3"
          - "8.4"

    steps:
      - name: "Checkout"
        uses: actions/checkout@v4

      - name: "Checkout Slevomat Coding Standard"
        uses: actions/checkout@v4
        with:
          repository: slevomat/coding-standard
          path: slevomat-cs
          ref: 88602f9ae5450a933133108d052eeb2edee0a4b7

      - name: "Install PHP"
        uses: "shivammathur/setup-php@v2"
        with:
          coverage: "none"
          php-version: "${{ matrix.php-version }}"

      - name: "Unset platform"
        working-directory: slevomat-cs
        run: "composer config --unset platform"

      - name: "Install dependencies"
        working-directory: slevomat-cs
        run: "composer install --no-interaction --no-progress"

      - name: "Remove stable phpdoc-parser"
        working-directory: slevomat-cs
        run: "rm -r vendor/phpstan/phpdoc-parser/src"

      - name: "Remove top-level phpcs.xml"
        run: "rm phpcs.xml"

      - name: "Copy phpdoc-parser"
        run: "cp -r src/ slevomat-cs/vendor/phpstan/phpdoc-parser/src"

      - name: "Tests"
        working-directory: slevomat-cs
        run: "bin/phpunit --no-coverage"

      - name: "PHPStan"
        if: matrix.php-version == '8.0' || matrix.php-version == '8.1' || matrix.php-version == '8.2'
        working-directory: slevomat-cs
        run: "bin/phpstan analyse -c build/PHPStan/phpstan.neon"

      - name: "PHPStan in tests"
        if: matrix.php-version == '8.0' || matrix.php-version == '8.1' || matrix.php-version == '8.2'
        working-directory: slevomat-cs
        run: "bin/phpstan analyse -c build/PHPStan/phpstan.tests.neon"