|
1 | 1 | name: build
|
2 | 2 |
|
3 | 3 | on:
|
4 |
| - push: |
5 |
| - pull_request: |
6 |
| - schedule: |
7 |
| - - cron: '0 0 * * *' |
8 |
| - |
9 |
| -env: |
10 |
| - GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} |
| 4 | + push: |
| 5 | + pull_request: |
11 | 6 |
|
12 | 7 | jobs:
|
13 |
| - security: |
14 |
| - name: Security |
15 |
| - runs-on: ${{ matrix.os }} |
16 |
| - |
17 |
| - strategy: |
18 |
| - fail-fast: false |
19 |
| - matrix: |
20 |
| - php: [ '8.1' ] |
21 |
| - os: [ ubuntu-latest ] |
22 |
| - |
23 |
| - steps: # General Steps |
24 |
| - - name: Set Git To Use LF |
25 |
| - run: | |
26 |
| - git config --global core.autocrlf false |
27 |
| - git config --global core.eol lf |
28 |
| - - name: Checkout |
29 |
| - uses: actions/checkout@v2 |
30 |
| - |
31 |
| - # Install PHP Dependencies |
32 |
| - - name: Setup PHP ${{ matrix.php }} |
33 |
| - uses: shivammathur/setup-php@v2 |
34 |
| - with: |
35 |
| - php-version: ${{ matrix.php }} |
36 |
| - - name: Validate Composer |
37 |
| - run: composer validate |
38 |
| - - name: Get Composer Cache Directory |
39 |
| - # Docs: <https://github.com/actions/cache/blob/master/examples.md#php---composer> |
40 |
| - id: composer-cache |
41 |
| - run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
42 |
| - - name: Restore Composer Cache |
43 |
| - uses: actions/cache@v1 |
44 |
| - with: |
45 |
| - path: ${{ steps.composer-cache.outputs.dir }} |
46 |
| - key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} |
47 |
| - restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer- |
48 |
| - - name: Install Dependencies |
49 |
| - uses: nick-invision/retry@v1 |
50 |
| - with: |
51 |
| - timeout_minutes: 5 |
52 |
| - max_attempts: 5 |
53 |
| - command: composer update --prefer-dist --no-interaction --no-progress |
54 |
| - |
55 |
| - # Execution |
56 |
| - - name: Security Advisories |
57 |
| - run: composer require --dev roave/security-advisories:dev-latest |
58 |
| - |
59 |
| - static-analysis: |
60 |
| - name: Psalm |
61 |
| - runs-on: ${{ matrix.os }} |
62 |
| - |
63 |
| - strategy: |
64 |
| - fail-fast: false |
65 |
| - matrix: |
66 |
| - php: [ '8.1' ] |
67 |
| - os: [ ubuntu-latest ] |
68 |
| - |
69 |
| - steps: # General Steps |
70 |
| - - name: Set Git To Use LF |
71 |
| - run: | |
72 |
| - git config --global core.autocrlf false |
73 |
| - git config --global core.eol lf |
74 |
| - - name: Checkout |
75 |
| - uses: actions/checkout@v2 |
76 |
| - |
77 |
| - # Install PHP Dependencies |
78 |
| - - name: Setup PHP ${{ matrix.php }} |
79 |
| - uses: shivammathur/setup-php@v2 |
80 |
| - with: |
81 |
| - php-version: ${{ matrix.php }} |
82 |
| - - name: Validate Composer |
83 |
| - run: composer validate |
84 |
| - - name: Get Composer Cache Directory |
85 |
| - # Docs: <https://github.com/actions/cache/blob/master/examples.md#php---composer> |
86 |
| - id: composer-cache |
87 |
| - run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
88 |
| - - name: Restore Composer Cache |
89 |
| - uses: actions/cache@v1 |
90 |
| - with: |
91 |
| - path: ${{ steps.composer-cache.outputs.dir }} |
92 |
| - key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} |
93 |
| - restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer- |
94 |
| - - name: Install Dependencies |
95 |
| - uses: nick-invision/retry@v1 |
96 |
| - with: |
97 |
| - timeout_minutes: 5 |
98 |
| - max_attempts: 5 |
99 |
| - command: composer update --prefer-dist --no-interaction --no-progress |
100 |
| - |
101 |
| - # Execution |
102 |
| - - name: Static Analysis |
103 |
| - continue-on-error: true |
104 |
| - run: vendor/bin/psalm --no-cache |
105 |
| - |
106 |
| - coding-standards: |
107 |
| - name: Coding Standards |
108 |
| - runs-on: ${{ matrix.os }} |
109 |
| - |
110 |
| - strategy: |
111 |
| - fail-fast: false |
112 |
| - matrix: |
113 |
| - php: [ '8.1' ] |
114 |
| - os: [ ubuntu-latest ] |
115 |
| - |
116 |
| - steps: # General Steps |
117 |
| - - name: Set Git To Use LF |
118 |
| - run: | |
119 |
| - git config --global core.autocrlf false |
120 |
| - git config --global core.eol lf |
121 |
| - - name: Checkout |
122 |
| - uses: actions/checkout@v2 |
123 |
| - |
124 |
| - # Install PHP Dependencies |
125 |
| - - name: Setup PHP ${{ matrix.php }} |
126 |
| - uses: shivammathur/setup-php@v2 |
127 |
| - with: |
128 |
| - php-version: ${{ matrix.php }} |
129 |
| - - name: Validate Composer |
130 |
| - run: composer validate |
131 |
| - - name: Get Composer Cache Directory |
132 |
| - # Docs: <https://github.com/actions/cache/blob/master/examples.md#php---composer> |
133 |
| - id: composer-cache |
134 |
| - run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
135 |
| - - name: Restore Composer Cache |
136 |
| - uses: actions/cache@v1 |
137 |
| - with: |
138 |
| - path: ${{ steps.composer-cache.outputs.dir }} |
139 |
| - key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} |
140 |
| - restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer- |
141 |
| - - name: Install Dependencies |
142 |
| - uses: nick-invision/retry@v1 |
143 |
| - with: |
144 |
| - timeout_minutes: 5 |
145 |
| - max_attempts: 5 |
146 |
| - command: composer update --prefer-dist --no-interaction --no-progress |
147 |
| - |
148 |
| - # Execution |
149 |
| - - name: Check Coding Standards |
150 |
| - run: vendor/bin/phpcs --standard=phpcs.xml |
151 |
| - |
152 |
| - test: |
153 |
| - name: Build (${{matrix.php}}, ${{ matrix.os }}, ${{ matrix.stability }}) |
154 |
| - runs-on: ${{ matrix.os }} |
155 |
| - |
156 |
| - strategy: |
157 |
| - fail-fast: false |
158 |
| - matrix: |
159 |
| - php: [ '7.4', '8.0', '8.1' ] |
160 |
| - os: [ ubuntu-latest, macos-latest, windows-latest ] |
161 |
| - stability: [ prefer-lowest, prefer-stable ] |
162 |
| - |
163 |
| - steps: # General Steps |
164 |
| - - name: Set Git To Use LF |
165 |
| - run: | |
166 |
| - git config --global core.autocrlf false |
167 |
| - git config --global core.eol lf |
168 |
| - - name: Checkout |
169 |
| - uses: actions/checkout@v2 |
170 |
| - |
171 |
| - # Install PHP Dependencies |
172 |
| - - name: Setup PHP ${{ matrix.php }} |
173 |
| - uses: shivammathur/setup-php@v2 |
174 |
| - with: |
175 |
| - php-version: ${{ matrix.php }} |
176 |
| - # PHP Extras |
177 |
| - coverage: pcov |
178 |
| - tools: pecl |
179 |
| - ini-values: "memory_limit=-1" |
180 |
| - - name: Validate Composer |
181 |
| - run: composer validate |
182 |
| - - name: Get Composer Cache Directory |
183 |
| - # Docs: <https://github.com/actions/cache/blob/master/examples.md#php---composer> |
184 |
| - id: composer-cache |
185 |
| - run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
186 |
| - - name: Restore Composer Cache |
187 |
| - uses: actions/cache@v1 |
188 |
| - with: |
189 |
| - path: ${{ steps.composer-cache.outputs.dir }} |
190 |
| - key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} |
191 |
| - restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer- |
192 |
| - - name: Install Dependencies |
193 |
| - uses: nick-invision/retry@v1 |
194 |
| - with: |
195 |
| - timeout_minutes: 5 |
196 |
| - max_attempts: 5 |
197 |
| - command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress |
198 |
| - |
199 |
| - # Execution |
200 |
| - - name: Execute Tests |
201 |
| - run: vendor/bin/phpunit |
| 8 | + tests: |
| 9 | + name: Unit Tests (${{matrix.php}}-${{matrix.ts}}, ${{ matrix.os }}, ${{ matrix.stability }}) |
| 10 | + runs-on: ${{ matrix.os }} |
| 11 | + strategy: |
| 12 | + fail-fast: false |
| 13 | + matrix: |
| 14 | + php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ] |
| 15 | + ts: [ 'ts', 'nts' ] |
| 16 | + os: [ ubuntu-latest, macos-latest, windows-latest ] |
| 17 | + stability: [ prefer-lowest, prefer-stable ] |
| 18 | + steps: |
| 19 | + - name: Checkout |
| 20 | + |
| 21 | + - name: Setup PHP ${{ matrix.php }} |
| 22 | + uses: shivammathur/setup-php@v2 |
| 23 | + with: |
| 24 | + php-version: ${{ matrix.php }} |
| 25 | + tools: composer:v2 |
| 26 | + ini-values: ffi.enable=1 |
| 27 | + extensions: ffi |
| 28 | + env: |
| 29 | + phpts: ${{ matrix.ts }} |
| 30 | + - name: Validate Composer |
| 31 | + run: composer validate |
| 32 | + - name: Install Dependencies |
| 33 | + uses: nick-invision/retry@v2 |
| 34 | + with: |
| 35 | + timeout_minutes: 5 |
| 36 | + max_attempts: 5 |
| 37 | + command: composer update --prefer-dist --no-interaction --no-progress |
| 38 | + - name: Execute Tests |
| 39 | + run: composer test |
0 commit comments