|
1 | 1 | on: pull_request |
2 | 2 | name: PR Review |
3 | 3 | jobs: |
4 | | - changelog: |
5 | | - runs-on: ubuntu-latest |
6 | | - name: Changelog should be updated |
7 | | - strategy: |
8 | | - fail-fast: false |
9 | | - steps: |
10 | | - - name: Checkout |
11 | | - uses: actions/checkout@master |
12 | | - with: |
13 | | - fetch-depth: 2 |
14 | | - |
15 | | - - name: Git fetch |
16 | | - run: git fetch |
17 | | - |
18 | | - - name: Check that changelog has been updated. |
19 | | - run: git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md && exit 1 || exit 0 |
20 | | - |
21 | | - test-composer-files: |
22 | | - name: Validate composer |
23 | | - runs-on: ubuntu-latest |
24 | | - steps: |
25 | | - - uses: actions/checkout@master |
26 | | - - name: Setup PHP, with composer and extensions |
27 | | - uses: shivammathur/setup-php@v2 |
28 | | - with: |
29 | | - php-version: 8.3 |
30 | | - extensions: ctype, dom, iconv, json, zip, gd, soap |
31 | | - coverage: none |
32 | | - tools: composer:v2 |
33 | | - # https://github.com/shivammathur/setup-php#cache-composer-dependencies |
34 | | - - name: Get composer cache directory |
35 | | - id: composer-cache |
36 | | - run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
37 | | - - name: Cache dependencies |
38 | | - uses: actions/cache@v4 |
39 | | - with: |
40 | | - path: ${{ steps.composer-cache.outputs.dir }} |
41 | | - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} |
42 | | - restore-keys: ${{ runner.os }}-composer- |
43 | | - - name: Validate composer files |
44 | | - run: | |
45 | | - composer validate composer.json |
46 | | - - name: Check composer file is normalized |
47 | | - run: | |
48 | | - composer install --no-interaction --no-progress |
49 | | - composer normalize composer.json --dry-run |
50 | | - composer audit |
51 | | -
|
52 | 4 | config-check: |
53 | 5 | name: Check that config is up to date |
54 | 6 | runs-on: ubuntu-latest |
|
69 | 21 | - name: Check for changes in config |
70 | 22 | run: git diff --diff-filter=ACMRT --exit-code config/ |
71 | 23 |
|
72 | | - phpcs: |
73 | | - name: PHP - Check Coding Standards |
74 | | - runs-on: ubuntu-latest |
75 | | - steps: |
76 | | - - uses: actions/checkout@master |
77 | | - - name: Setup PHP, with composer and extensions |
78 | | - uses: shivammathur/setup-php@v2 |
79 | | - with: |
80 | | - php-version: 8.3 |
81 | | - extensions: ctype, dom, iconv, json, zip, gd, soap |
82 | | - coverage: none |
83 | | - tools: composer:v2 |
84 | | - # https://github.com/shivammathur/setup-php#cache-composer-dependencies |
85 | | - - name: Get composer cache directory |
86 | | - id: composer-cache |
87 | | - run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
88 | | - - name: Cache dependencies |
89 | | - uses: actions/cache@v4 |
90 | | - with: |
91 | | - path: ${{ steps.composer-cache.outputs.dir }} |
92 | | - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} |
93 | | - restore-keys: ${{ runner.os }}-composer- |
94 | | - - name: Install Dependencies |
95 | | - run: | |
96 | | - composer install --no-interaction --no-progress |
97 | | - - name: PHPCS |
98 | | - run: | |
99 | | - composer coding-standards-check |
100 | | -
|
101 | 24 | yarncs: |
102 | 25 | name: Yarn - Check Coding Standards (Node ${{ matrix.node }}) |
103 | 26 | runs-on: ubuntu-latest |
|
0 commit comments