File: unit-tests.yml

package info (click to toggle)
php-symfony-mercure 0.6.5-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 388 kB
  • sloc: php: 1,519; makefile: 12
file content (67 lines) | stat: -rw-r--r-- 1,823 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
name: "unit tests"

on: ["pull_request", "push"]

jobs:
  unit-tests:
    name: "unit tests"

    runs-on: "ubuntu-latest"

    strategy:
      matrix:
        dependencies:
          - "lowest"
          - "highest"
        php-version:
          - "7.1"
          - "7.2"
          - "7.3"
          - "7.4"
          - "8.0"
          - "8.1"
          - "8.2"
          - "8.3"

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

      - name: "installing PHP"
        uses: "shivammathur/setup-php@v2"
        with:
          php-version: "${{ matrix.php-version }}"
          ini-values: memory_limit=-1
          tools: composer:v2, cs2pr

      - name: "caching dependencies"
        uses: "actions/cache@v3"
        with:
          path: |
            ~/.composer/cache
            vendor
          key: "php-${{ matrix.php-version }}-${{ matrix.operating-system }}"
          restore-keys: "php-${{ matrix.php-version }}-${{ matrix.operating-system }}"

      - name: "installing lowest dependencies"
        if: ${{ matrix.dependencies == 'lowest' }}
        run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"

      - name: "installing highest dependencies"
        if: ${{ matrix.dependencies == 'highest' }}
        run: "composer update --no-interaction --no-progress --no-suggest"

      - name: "installing PHPUnit"
        run: "php vendor/bin/simple-phpunit install"

      - name: "running unit tests"
        if: ${{ matrix.dependencies == 'highest' }}
        env:
          SYMFONY_DEPRECATIONS_HELPER: 1
        run: "php vendor/bin/simple-phpunit"

      - name: "running unit tests"
        if: ${{ matrix.dependencies == 'lowest' }}
        env:
          SYMFONY_DEPRECATIONS_HELPER: max[self]=0
        run: "php vendor/bin/simple-phpunit"