File: build.yml

package info (click to toggle)
php-phpspec-prophecy 1.25.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,368 kB
  • sloc: php: 10,594; makefile: 16
file content (77 lines) | stat: -rw-r--r-- 2,175 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
75
76
77
name: Build

on:
  push:
    branches: [master]
  pull_request:
  release:
    types: [created]

jobs:
  tests:
    runs-on: ubuntu-latest
    name: Build and test
    continue-on-error: ${{ matrix.experimental || false }}
    strategy:
      fail-fast: false
      matrix:
        php: ["8.2", "8.3", "8.4"]
        composer-flags: [ "" ]
        experimental: [ false ]
        include:
          - php: 8.2
            composer-flags: "--prefer-lowest"
          - php: "8.5" # TODO move that to a normal job once phpspec supports PHP 8.5
            composer-flags: "--ignore-platform-req=php+"
          - php: nightly
            composer-flags: "--ignore-platform-req=php+"
            experimental: true

    steps:
      -   uses: actions/checkout@v5

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

      -   name: Install dependencies
          run: COMPOSER_ROOT_VERSION=dev-master composer update ${{ matrix.composer-flags }} --no-scripts
          id: end-of-setup

      -   name: Run tests (phpspec)
          run: ./vendor/bin/phpspec run --format=dot
          if: always() && steps.end-of-setup.outcome == 'success'

      -   name: Run tests (phpunit)
          run: ./vendor/bin/phpunit
          if: always() && steps.end-of-setup.outcome == 'success'

  phpstan:
    runs-on: ubuntu-latest
    name: Static analysis
    steps:
      - uses: actions/checkout@v5
      - name: Set up PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: "8.3"
          coverage: none
      - name: Install dependencies
        run: COMPOSER_ROOT_VERSION=dev-master composer update --no-scripts
      - run: ./vendor/bin/phpstan

  coding-standards:
    runs-on: ubuntu-latest
    name: Coding standards
    steps:
      - uses: actions/checkout@v5
      - name: Set up PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: "8.3"
          coverage: none
      - name: Install dependencies
        run: COMPOSER_ROOT_VERSION=dev-master composer update --no-scripts
      - run: composer cs:check -- --ansi