|
1 | 1 | on: pull_request |
2 | 2 | name: Review |
3 | 3 | jobs: |
4 | | - test-composer-install: |
5 | | - runs-on: ubuntu-latest |
6 | | - strategy: |
7 | | - fail-fast: false |
8 | | - matrix: |
9 | | - php: [ '8.3' ] |
10 | | - name: Validate composer (${{ matrix.php}}) |
11 | | - steps: |
12 | | - - uses: actions/checkout@v4 |
13 | | - |
14 | | - - name: Setup PHP, with composer and extensions |
15 | | - uses: shivammathur/setup-php@v2 |
16 | | - with: |
17 | | - php-version: ${{ matrix.php}} |
18 | | - extensions: http, ctype, iconv |
19 | | - coverage: none |
20 | | - |
21 | | - - name: Get composer cache directory |
22 | | - id: composer-cache |
23 | | - run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
24 | | - |
25 | | - - name: Cache dependencies |
26 | | - uses: actions/cache@v4 |
27 | | - with: |
28 | | - path: ${{ steps.composer-cache.outputs.dir }} |
29 | | - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.dependency-version }}- |
30 | | - restore-keys: ${{ runner.os }}-composer-${{ matrix.dependency-version }}- |
31 | | - |
32 | | - - name: Validate composer files |
33 | | - run: composer validate composer.json --strict |
34 | | - |
35 | | - - name: Composer install with exported .env variables |
36 | | - run: | |
37 | | - set -a && source .env && set +a |
38 | | - APP_ENV=prod composer install --no-dev -o |
39 | | -
|
40 | 4 | test-suite: |
41 | 5 | name: Test suite (${{ matrix.php }}) |
42 | 6 | runs-on: ubuntu-latest |
|
77 | 41 | files: ./coverage/unit.xml |
78 | 42 | flags: unittests, ${{ matrix.php }} |
79 | 43 |
|
80 | | - php-cs-fixer: |
81 | | - runs-on: ubuntu-latest |
82 | | - strategy: |
83 | | - fail-fast: false |
84 | | - matrix: |
85 | | - php: ["8.3"] |
86 | | - name: PHP Coding Standards Fixer (PHP ${{ matrix.php }}) |
87 | | - steps: |
88 | | - - name: Checkout |
89 | | - uses: actions/checkout@v4 |
90 | | - |
91 | | - - name: Setup PHP, with composer and extensions |
92 | | - uses: shivammathur/setup-php@v2 |
93 | | - with: |
94 | | - php-version: ${{ matrix.php}} |
95 | | - extensions: http, ctype, iconv |
96 | | - coverage: none |
97 | | - |
98 | | - - name: Get composer cache directory |
99 | | - id: composer-cache |
100 | | - run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
101 | | - |
102 | | - - name: Cache composer dependencies |
103 | | - uses: actions/cache@v4 |
104 | | - with: |
105 | | - path: ${{ steps.composer-cache.outputs.dir }} |
106 | | - key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} |
107 | | - restore-keys: ${{ matrix.php }}-composer- |
108 | | - |
109 | | - - name: Install Dependencies |
110 | | - run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist |
111 | | - |
112 | | - - name: php-cs-fixer |
113 | | - run: phpdbg -qrr ./vendor/bin/php-cs-fixer fix --dry-run |
114 | | - |
115 | 44 | psalm: |
116 | 45 | runs-on: ubuntu-latest |
117 | 46 | strategy: |
@@ -147,31 +76,6 @@ jobs: |
147 | 76 | - name: Psalm |
148 | 77 | run: ./vendor/bin/psalm --no-cache |
149 | 78 |
|
150 | | - markdownlint: |
151 | | - name: Markdown Lint |
152 | | - runs-on: ubuntu-latest |
153 | | - steps: |
154 | | - - name: Checkout |
155 | | - uses: actions/checkout@v4 |
156 | | - - name: Get yarn cache directory path |
157 | | - id: yarn-cache-dir-path |
158 | | - run: echo "::set-output name=dir::$(yarn cache dir)" |
159 | | - - name: Cache yarn packages |
160 | | - uses: actions/cache@v4 |
161 | | - id: yarn-cache |
162 | | - with: |
163 | | - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} |
164 | | - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
165 | | - restore-keys: | |
166 | | - ${{ runner.os }}-yarn- |
167 | | - - name: Yarn install |
168 | | - uses: actions/setup-node@v2 |
169 | | - with: |
170 | | - node-version: '22' |
171 | | - - run: yarn install |
172 | | - - name: markdownlint |
173 | | - run: yarn run coding-standards-check |
174 | | - |
175 | 79 | apispec: |
176 | 80 | runs-on: ubuntu-latest |
177 | 81 | name: API Specification validation |
@@ -211,18 +115,3 @@ jobs: |
211 | 115 |
|
212 | 116 | - name: Check for changes in specifications |
213 | 117 | run: git diff --diff-filter=ACMRT --exit-code public/spec.yaml |
214 | | - |
215 | | - changelog: |
216 | | - runs-on: ubuntu-latest |
217 | | - name: Changelog should be updated |
218 | | - steps: |
219 | | - - name: Checkout |
220 | | - uses: actions/checkout@v4 |
221 | | - with: |
222 | | - fetch-depth: 2 |
223 | | - |
224 | | - - name: Git fetch |
225 | | - run: git fetch |
226 | | - |
227 | | - - name: Check that changelog has been updated. |
228 | | - run: git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md && exit 1 || exit 0 |
0 commit comments