|
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@v4 |
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 | | - strategy: |
25 | | - matrix: |
26 | | - php-versions: [ '8.3' ] |
27 | | - dependency-version: [ prefer-lowest, prefer-stable ] |
28 | | - steps: |
29 | | - - uses: actions/checkout@v4 |
30 | | - - name: Setup PHP, with composer and extensions |
31 | | - uses: shivammathur/setup-php@v2 |
32 | | - with: |
33 | | - php-version: ${{ matrix.php-versions }} |
34 | | - extensions: json |
35 | | - coverage: none |
36 | | - tools: composer:v2 |
37 | | - # https://github.com/shivammathur/setup-php#cache-composer-dependencies |
38 | | - - name: Get composer cache directory |
39 | | - id: composer-cache |
40 | | - run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
41 | | - - name: Cache dependencies |
42 | | - uses: actions/cache@v4 |
43 | | - with: |
44 | | - path: ${{ steps.composer-cache.outputs.dir }} |
45 | | - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} |
46 | | - restore-keys: ${{ runner.os }}-composer- |
47 | | - - name: Validate composer files |
48 | | - run: | |
49 | | - composer validate --strict composer.json |
50 | | - # Check that dependencies resolve. |
51 | | - composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction |
52 | | -
|
53 | | - php-check-coding-standards: |
54 | | - name: PHP - Check Coding Standards |
55 | | - runs-on: ubuntu-latest |
56 | | - strategy: |
57 | | - matrix: |
58 | | - php-versions: [ '8.3' ] |
59 | | - dependency-version: [ prefer-lowest, prefer-stable ] |
60 | | - steps: |
61 | | - - uses: actions/checkout@v4 |
62 | | - - name: Setup PHP, with composer and extensions |
63 | | - uses: shivammathur/setup-php@v2 |
64 | | - with: |
65 | | - php-version: ${{ matrix.php-versions }} |
66 | | - extensions: json |
67 | | - coverage: none |
68 | | - tools: composer:v2 |
69 | | - # https://github.com/shivammathur/setup-php#cache-composer-dependencies |
70 | | - - name: Get composer cache directory |
71 | | - id: composer-cache |
72 | | - run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
73 | | - - name: Cache dependencies |
74 | | - uses: actions/cache@v4 |
75 | | - with: |
76 | | - path: ${{ steps.composer-cache.outputs.dir }} |
77 | | - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} |
78 | | - restore-keys: ${{ runner.os }}-composer- |
79 | | - - name: Install Dependencies |
80 | | - run: | |
81 | | - composer install --no-interaction --no-progress |
82 | | - - name: PHPCS |
83 | | - run: | |
84 | | - composer coding-standards-check/phpcs |
85 | | -
|
86 | | - php-code-analysis: |
87 | | - name: PHP code analysis |
88 | | - runs-on: ubuntu-latest |
89 | | - strategy: |
90 | | - matrix: |
91 | | - php-versions: [ '8.3' ] |
92 | | - steps: |
93 | | - - uses: actions/checkout@master |
94 | | - - name: Setup PHP, with composer and extensions |
95 | | - uses: shivammathur/setup-php@v2 |
96 | | - with: |
97 | | - php-version: ${{ matrix.php-versions }} |
98 | | - extensions: json |
99 | | - coverage: none |
100 | | - tools: composer:v2 |
101 | | - # https://github.com/shivammathur/setup-php#cache-composer-dependencies |
102 | | - - name: Get composer cache directory |
103 | | - id: composer-cache |
104 | | - run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
105 | | - - name: Cache dependencies |
106 | | - uses: actions/cache@v4 |
107 | | - with: |
108 | | - path: ${{ steps.composer-cache.outputs.dir }} |
109 | | - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} |
110 | | - restore-keys: ${{ runner.os }}-composer- |
111 | | - - name: Install Dependencies |
112 | | - run: | |
113 | | - composer install --no-interaction --no-progress |
114 | | - - name: Code analysis |
115 | | - run: | |
116 | | - ./scripts/code-analysis |
117 | | -
|
118 | 4 | unit_tests: |
119 | 5 | name: PHP - Unit test |
120 | 6 | runs-on: ubuntu-latest |
@@ -154,15 +40,6 @@ jobs: |
154 | 40 | docker exec drupal_test /app/vendor/bin/drush --yes pm:enable azure_ad_delta_sync |
155 | 41 | # Run our module tests |
156 | 42 | docker exec drupal_test sh -c 'cd /app/web; ../vendor/bin/phpunit modules/contrib/azure-ad-delta-sync-drupal/tests/src/Functional' |
157 | | - markdown-lint: |
158 | | - name: Markdown lint |
159 | | - runs-on: ubuntu-latest |
160 | | - steps: |
161 | | - - name: Checkout |
162 | | - uses: actions/checkout@v4 |
163 | | - |
164 | | - - name: Markdown lint |
165 | | - run: docker run --rm --volume "$PWD:/md" peterdavehello/markdownlint markdownlint --ignore vendor '**/*.md' |
166 | 43 |
|
167 | 44 | check-proxy-classes: |
168 | 45 | runs-on: ubuntu-latest |
|
181 | 58 | ./scripts/rector |
182 | 59 | - name: Check nothing has changed |
183 | 60 | run: git diff --exit-code |
184 | | - |
| 61 | + |
185 | 62 | test-command-runs: |
186 | 63 | runs-on: ubuntu-latest |
187 | 64 | steps: |
|
0 commit comments