|
1 |
| -name: Bundle CI |
| 1 | +name: PHPUnit |
2 | 2 | on:
|
3 |
| - push: |
4 |
| - branches: ['main'] |
5 |
| - pull_request: |
6 |
| - schedule: |
7 |
| - - cron: '0 */12 * * *' |
| 3 | + push: |
| 4 | + branches: ['main'] |
| 5 | + pull_request: |
| 6 | + schedule: |
| 7 | + - cron: '0 */12 * * *' |
8 | 8 |
|
9 | 9 | jobs:
|
10 |
| - static-analysis: |
11 |
| - name: Static Analysis |
12 |
| - runs-on: ubuntu-18.04 |
13 |
| - |
14 |
| - steps: |
15 |
| - - name: "Checkout code" |
16 |
| - uses: "actions/checkout@v2" |
17 |
| - |
18 |
| - - name: "Install PHP" |
19 |
| - uses: "shivammathur/setup-php@v2" |
20 |
| - with: |
21 |
| - coverage: "none" |
22 |
| - php-version: "8.0" |
23 |
| - |
24 |
| - - name: "Validate composer.json" |
25 |
| - run: "composer validate --strict --no-check-lock" |
26 |
| - |
27 |
| - - name: "Composer install" |
28 |
| - uses: "ramsey/composer-install@v1" |
29 |
| - with: |
30 |
| - composer-options: "--prefer-stable" |
31 |
| - dependency-versions: 'highest' |
32 |
| - |
33 |
| - - name: Install PHP-CS-Fixer |
34 |
| - run: composer global require friendsofphp/php-cs-fixer --prefer-dist --no-progress |
35 |
| - |
36 |
| - - name: Running Pslam |
37 |
| - run: vendor/bin/psalm -c $GITHUB_WORKSPACE/psalm.xml --php-version=8.0 |
38 |
| - |
39 |
| - - name: Running php-cs-fixer |
40 |
| - run: $HOME/.composer/vendor/bin/php-cs-fixer fix --config $GITHUB_WORKSPACE/.php-cs-fixer.dist.php --diff --dry-run |
41 |
| - |
42 |
| - tests: |
43 |
| - name: "Tests ${{ matrix.php-version }} ${{ matrix.dependency-versions }} deps ${{ matrix.dependency-versions }}" |
44 |
| - runs-on: ubuntu-18.04 |
45 |
| - |
46 |
| - strategy: |
47 |
| - fail-fast: false |
48 |
| - matrix: |
49 |
| - # normal, highest, non-dev installs |
50 |
| - php-version: ['7.2', '7.3', '7.4', '8.0', '8.1'] |
51 |
| - composer-options: ['--prefer-stable'] |
52 |
| - dependency-versions: ['highest'] |
53 |
| - include: |
54 |
| - # testing lowest PHP version with lowest dependencies |
55 |
| - - php-version: '7.2.5' |
56 |
| - dependency-versions: 'lowest' |
57 |
| - composer-options: '--prefer-lowest' |
58 |
| - |
59 |
| - # testing dev versions with highest PHP |
60 |
| - - php-version: '8.0' |
61 |
| - dependency-versions: 'highest' |
62 |
| - composer-options: '' # allow dev deps |
63 |
| - |
64 |
| - steps: |
65 |
| - - name: "Checkout code" |
66 |
| - uses: "actions/checkout@v2" |
67 |
| - |
68 |
| - - name: "Install PHP" |
69 |
| - uses: "shivammathur/setup-php@v2" |
70 |
| - with: |
71 |
| - coverage: "none" |
72 |
| - php-version: "${{ matrix.php-version }}" |
73 |
| - |
74 |
| - - name: "Composer install" |
75 |
| - uses: "ramsey/composer-install@v1" |
76 |
| - with: |
77 |
| - dependency-versions: "${{ matrix.dependency-versions }}" |
78 |
| - composer-options: "--prefer-dist --no-progress" |
79 |
| - |
80 |
| - - name: Unit Tests |
81 |
| - run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite unit |
82 |
| - |
83 |
| - - name: Functional Tests |
84 |
| - run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite functional |
85 |
| - |
86 |
| - - name: Integration Tests |
87 |
| - run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite integration |
| 10 | + tests: |
| 11 | + name: "${{ matrix.php-version }} ${{ matrix.dependency-versions }} deps ${{ matrix.dependency-versions }}" |
| 12 | + runs-on: ubuntu-latest |
| 13 | + |
| 14 | + strategy: |
| 15 | + fail-fast: false |
| 16 | + matrix: |
| 17 | + # normal, highest, non-dev installs |
| 18 | + php-version: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] |
| 19 | + composer-options: ['--prefer-stable'] |
| 20 | + dependency-versions: ['highest'] |
| 21 | + include: |
| 22 | + # testing lowest PHP version with lowest dependencies |
| 23 | + - php-version: '7.2.5' |
| 24 | + dependency-versions: 'lowest' |
| 25 | + composer-options: '--prefer-lowest' |
| 26 | + |
| 27 | + # testing dev versions with highest PHP |
| 28 | + - php-version: '8.2' |
| 29 | + dependency-versions: 'highest' |
| 30 | + composer-options: '' # allow dev deps |
| 31 | + |
| 32 | + steps: |
| 33 | + - name: "Checkout code" |
| 34 | + uses: "actions/checkout@v3" |
| 35 | + |
| 36 | + - name: "Install PHP" |
| 37 | + uses: "shivammathur/setup-php@v2" |
| 38 | + with: |
| 39 | + coverage: "none" |
| 40 | + php-version: "${{ matrix.php-version }}" |
| 41 | + |
| 42 | + - name: "Composer install" |
| 43 | + uses: "ramsey/composer-install@v1" |
| 44 | + with: |
| 45 | + dependency-versions: "${{ matrix.dependency-versions }}" |
| 46 | + composer-options: "--prefer-dist --no-progress" |
| 47 | + |
| 48 | + - name: Unit Tests |
| 49 | + run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite unit |
| 50 | + |
| 51 | + - name: Functional Tests |
| 52 | + run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite functional |
| 53 | + |
| 54 | + - name: Integration Tests |
| 55 | + run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite integration |
0 commit comments