|
1 | 1 | name: CI
|
2 | 2 |
|
3 | 3 | on:
|
4 |
| - pull_request: |
5 |
| - push: |
6 |
| - branches: |
7 |
| - - 'main' |
| 4 | + pull_request: |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - 'main' |
8 | 8 |
|
9 | 9 | jobs:
|
10 |
| - composer-validate: |
11 |
| - runs-on: ubuntu-latest |
12 |
| - name: "Composer Validate" |
13 |
| - steps: |
14 |
| - - name: 'Checkout Code' |
15 |
| - uses: actions/checkout@v2 |
16 |
| - |
17 |
| - - name: 'Validate composer.json' |
18 |
| - run: composer validate --no-check-all --strict --no-check-lock |
19 |
| - |
20 |
| - composer-install: |
21 |
| - needs: composer-validate |
22 |
| - runs-on: ubuntu-latest |
23 |
| - name: "Composer Install" |
24 |
| - steps: |
25 |
| - - name: 'Checkout Code' |
26 |
| - uses: actions/checkout@v2 |
27 |
| - |
28 |
| - - name: 'Install Dependencies' |
29 |
| - run: composer install --prefer-dist --no-progress --no-interaction |
30 |
| - |
31 |
| - code-style: |
32 |
| - needs: composer-install |
33 |
| - runs-on: ubuntu-latest |
34 |
| - name: "Code Style" |
35 |
| - strategy: |
36 |
| - fail-fast: false |
37 |
| - steps: |
38 |
| - - name: 'Checkout Code' |
39 |
| - uses: actions/checkout@v2 |
40 |
| - |
41 |
| - - name: 'Setup PHP' |
42 |
| - uses: shivammathur/setup-php@v2 |
43 |
| - with: |
44 |
| - php-version: 8.1 |
45 |
| - ini-values: memory_limit=-1 |
46 |
| - coverage: none |
47 |
| - tools: composer:v2 |
48 |
| - |
49 |
| - - name: 'Install PHP dependencies with Composer' |
50 |
| - run: composer install --prefer-dist --no-progress --optimize-autoloader |
51 |
| - working-directory: './' |
52 |
| - |
53 |
| - - name: 'Run CodeSniffer' |
54 |
| - run: ./vendor/bin/phpcs ./ -p --encoding=utf-8 --extensions=php --ignore="vendor|Tests|src|public" --standard=./vendor/escapestudios/symfony2-coding-standard/Symfony |
55 |
| - |
56 |
| - static-analysis: |
57 |
| - needs: composer-install |
58 |
| - runs-on: ubuntu-latest |
59 |
| - name: "Static Analysis" |
60 |
| - strategy: |
61 |
| - fail-fast: false |
62 |
| - steps: |
63 |
| - - name: 'Checkout Code' |
64 |
| - uses: actions/checkout@v2 |
65 |
| - |
66 |
| - - name: 'Setup PHP' |
67 |
| - uses: shivammathur/setup-php@v2 |
68 |
| - with: |
69 |
| - php-version: 8.1 |
70 |
| - ini-values: memory_limit=-1 |
71 |
| - coverage: none |
72 |
| - tools: composer:v2 |
73 |
| - |
74 |
| - - name: 'Install PHP dependencies with Composer' |
75 |
| - run: composer install --prefer-dist --no-progress --optimize-autoloader |
76 |
| - working-directory: './' |
77 |
| - |
78 |
| - - name: 'Run PHPStan' |
79 |
| - run: ./vendor/bin/phpstan analyse --no-progress -c phpstan.neon ./ |
80 |
| - |
81 |
| - test: |
82 |
| - needs: composer-install |
83 |
| - runs-on: ubuntu-latest |
84 |
| - name: "Tests (PHP ${{ matrix.php-version }} / Symfony ${{ matrix.symfony-version }})" |
85 |
| - strategy: |
86 |
| - fail-fast: false |
87 |
| - matrix: |
88 |
| - php-version: |
89 |
| - - '7.4' |
90 |
| - - '8.0' |
91 |
| - - '8.1' |
92 |
| - symfony-version: |
93 |
| - - '5.3' |
94 |
| - - '5.4' |
95 |
| - - '6.0' |
96 |
| - steps: |
97 |
| - - name: 'Checkout Code' |
98 |
| - uses: actions/checkout@v2 |
99 |
| - |
100 |
| - - name: 'Setup PHP' |
101 |
| - uses: shivammathur/setup-php@v2 |
102 |
| - with: |
103 |
| - php-version: ${{ matrix.php-version }} |
104 |
| - ini-values: memory_limit=-1 |
105 |
| - coverage: none |
106 |
| - tools: composer:v2 |
107 |
| - env: |
108 |
| - SYMFONY_VERSION: ${{ matrix.symfony-version }} |
109 |
| - |
110 |
| - - name: 'Install PHP dependencies with Composer' |
111 |
| - run: composer install --prefer-dist --no-progress --optimize-autoloader |
112 |
| - working-directory: './' |
113 |
| - |
114 |
| - - name: 'Run PHPUnit' |
115 |
| - run: ./vendor/bin/phpunit -v -c phpunit.xml.dist |
116 |
| - |
117 |
| - code-coverage: |
118 |
| - needs: test |
119 |
| - runs-on: ubuntu-latest |
120 |
| - name: "Code Coverage" |
121 |
| - strategy: |
122 |
| - fail-fast: false |
123 |
| - steps: |
124 |
| - - name: 'Checkout Code' |
125 |
| - uses: actions/checkout@v2 |
126 |
| - |
127 |
| - - name: 'Setup PHP' |
128 |
| - uses: shivammathur/setup-php@v2 |
129 |
| - with: |
130 |
| - php-version: 8.1 |
131 |
| - ini-values: memory_limit=-1 |
132 |
| - coverage: pcov |
133 |
| - tools: composer:v2 |
134 |
| - |
135 |
| - - name: 'Install PHP dependencies with Composer' |
136 |
| - run: composer install --prefer-dist --no-progress --optimize-autoloader |
137 |
| - working-directory: './' |
138 |
| - |
139 |
| - - name: 'Run PHPUnit with Code Coverage' |
140 |
| - run: ./vendor/bin/phpunit -v -c phpunit.xml.dist --coverage-clover=coverage.xml |
141 |
| - |
142 |
| - - name: 'Download Coverage Files' |
143 |
| - uses: actions/download-artifact@v2 |
144 |
| - with: |
145 |
| - path: reports |
146 |
| - |
147 |
| - - name: 'Upload to Codecov' |
148 |
| - uses: codecov/codecov-action@v1 |
149 |
| - with: |
150 |
| - files: ./coverage.xml |
151 |
| - fail_ci_if_error: true |
152 |
| - verbose: true |
| 10 | + composer-validate: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + name: "Composer Validate" |
| 13 | + steps: |
| 14 | + - name: 'Checkout Code' |
| 15 | + uses: actions/checkout@v2 |
| 16 | + |
| 17 | + - name: 'Validate composer.json' |
| 18 | + run: composer validate --no-check-all --strict --no-check-lock |
| 19 | + |
| 20 | + composer-install: |
| 21 | + needs: composer-validate |
| 22 | + runs-on: ubuntu-latest |
| 23 | + name: "Composer Install" |
| 24 | + steps: |
| 25 | + - name: 'Checkout Code' |
| 26 | + uses: actions/checkout@v2 |
| 27 | + |
| 28 | + - name: 'Install Dependencies' |
| 29 | + run: composer install --prefer-dist --no-progress --no-interaction |
| 30 | + |
| 31 | + code-style: |
| 32 | + needs: composer-install |
| 33 | + runs-on: ubuntu-latest |
| 34 | + name: "Code Style" |
| 35 | + strategy: |
| 36 | + fail-fast: false |
| 37 | + steps: |
| 38 | + - name: 'Checkout Code' |
| 39 | + uses: actions/checkout@v2 |
| 40 | + |
| 41 | + - name: 'Setup PHP' |
| 42 | + uses: shivammathur/setup-php@v2 |
| 43 | + with: |
| 44 | + php-version: 8.1 |
| 45 | + ini-values: memory_limit=-1 |
| 46 | + coverage: none |
| 47 | + tools: composer:v2 |
| 48 | + |
| 49 | + - name: 'Install PHP dependencies with Composer' |
| 50 | + run: composer install --prefer-dist --no-progress --optimize-autoloader |
| 51 | + working-directory: './' |
| 52 | + |
| 53 | + - name: 'Run CodeSniffer' |
| 54 | + run: ./vendor/bin/phpcs ./ -p --encoding=utf-8 --extensions=php --ignore="vendor|Tests|src|public" --standard=./vendor/escapestudios/symfony2-coding-standard/Symfony |
| 55 | + |
| 56 | + static-analysis: |
| 57 | + needs: composer-install |
| 58 | + runs-on: ubuntu-latest |
| 59 | + name: "Static Analysis" |
| 60 | + strategy: |
| 61 | + fail-fast: false |
| 62 | + steps: |
| 63 | + - name: 'Checkout Code' |
| 64 | + uses: actions/checkout@v2 |
| 65 | + |
| 66 | + - name: 'Setup PHP' |
| 67 | + uses: shivammathur/setup-php@v2 |
| 68 | + with: |
| 69 | + php-version: 8.1 |
| 70 | + ini-values: memory_limit=-1 |
| 71 | + coverage: none |
| 72 | + tools: composer:v2 |
| 73 | + |
| 74 | + - name: 'Install PHP dependencies with Composer' |
| 75 | + run: composer install --prefer-dist --no-progress --optimize-autoloader |
| 76 | + working-directory: './' |
| 77 | + |
| 78 | + - name: 'Run PHPStan' |
| 79 | + run: ./vendor/bin/phpstan analyse --no-progress -c phpstan.neon ./ |
| 80 | + |
| 81 | + test: |
| 82 | + needs: composer-install |
| 83 | + runs-on: ubuntu-latest |
| 84 | + name: "Tests (PHP ${{ matrix.php-version }} / Symfony ${{ matrix.symfony-version }})" |
| 85 | + strategy: |
| 86 | + fail-fast: false |
| 87 | + matrix: |
| 88 | + php-version: |
| 89 | + - '8.1' |
| 90 | + symfony-version: |
| 91 | + - '6.1' |
| 92 | + steps: |
| 93 | + - name: 'Checkout Code' |
| 94 | + uses: actions/checkout@v2 |
| 95 | + |
| 96 | + - name: 'Setup PHP' |
| 97 | + uses: shivammathur/setup-php@v2 |
| 98 | + with: |
| 99 | + php-version: ${{ matrix.php-version }} |
| 100 | + ini-values: memory_limit=-1 |
| 101 | + coverage: none |
| 102 | + tools: composer:v2 |
| 103 | + env: |
| 104 | + SYMFONY_VERSION: ${{ matrix.symfony-version }} |
| 105 | + |
| 106 | + - name: 'Install PHP dependencies with Composer' |
| 107 | + run: composer install --prefer-dist --no-progress --optimize-autoloader |
| 108 | + working-directory: './' |
| 109 | + |
| 110 | + - name: 'Run PHPUnit' |
| 111 | + run: ./vendor/bin/phpunit -v -c phpunit.xml.dist |
| 112 | + |
| 113 | + code-coverage: |
| 114 | + needs: test |
| 115 | + runs-on: ubuntu-latest |
| 116 | + name: "Code Coverage" |
| 117 | + strategy: |
| 118 | + fail-fast: false |
| 119 | + steps: |
| 120 | + - name: 'Checkout Code' |
| 121 | + uses: actions/checkout@v2 |
| 122 | + |
| 123 | + - name: 'Setup PHP' |
| 124 | + uses: shivammathur/setup-php@v2 |
| 125 | + with: |
| 126 | + php-version: 8.1 |
| 127 | + ini-values: memory_limit=-1 |
| 128 | + coverage: pcov |
| 129 | + tools: composer:v2 |
| 130 | + |
| 131 | + - name: 'Install PHP dependencies with Composer' |
| 132 | + run: composer install --prefer-dist --no-progress --optimize-autoloader |
| 133 | + working-directory: './' |
| 134 | + |
| 135 | + - name: 'Run PHPUnit with Code Coverage' |
| 136 | + run: ./vendor/bin/phpunit -v -c phpunit.xml.dist --coverage-clover=coverage.xml |
| 137 | + |
| 138 | + - name: 'Download Coverage Files' |
| 139 | + uses: actions/download-artifact@v2 |
| 140 | + with: |
| 141 | + path: reports |
| 142 | + |
| 143 | + - name: 'Upload to Codecov' |
| 144 | + uses: codecov/codecov-action@v1 |
| 145 | + with: |
| 146 | + files: ./coverage.xml |
| 147 | + fail_ci_if_error: true |
| 148 | + verbose: true |
0 commit comments