-
Notifications
You must be signed in to change notification settings - Fork 3
82 lines (74 loc) · 2.44 KB
/
pr.yml
File metadata and controls
82 lines (74 loc) · 2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
on: pull_request
name: Review
jobs:
changelog:
runs-on: ubuntu-latest
name: Changelog should be updated
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Git fetch
run: git fetch
- name: Check that changelog has been updated.
run: git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md && exit 1 || exit 0
validate-composer-files:
name: Validate composer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate composer files
run: |
# Note that we don't use the --strict flag on validate due to the
# package drupal/config_entity_revisions 2.0.x-dev being considered a
# version cf.
# https://getcomposer.org/doc/articles/versions.md#branches
docker compose run --rm php composer validate composer.json
- name: Check that composer file is normalized
run: |
docker compose run --rm php composer install
docker compose run --rm php composer normalize --dry-run
test-composer-files:
name: Test composer files
runs-on: ubuntu-latest
strategy:
matrix:
dependency-version: [ prefer-lowest, prefer-stable ]
steps:
- uses: actions/checkout@v4
- name: Check that dependencies resolve.
run: |
# Clean up before update (cf. https://www.drupal.org/project/simplesamlphp_auth/issues/3350773)
rm -fr vendor/
docker compose run --rm php composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
php-coding-standards:
name: PHP coding standards
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
docker compose run --rm php composer install
- name: PHPCS
run: |
docker compose run --rm php composer coding-standards-check/phpcs
php-code-analysis:
name: PHP code analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Code analysis
run: |
./scripts/code-analysis
coding-standards-markdown:
name: Markdown coding standards
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Coding standards
run: |
docker compose run --rm markdownlint markdownlint '**/*.md'