-
Notifications
You must be signed in to change notification settings - Fork 0
128 lines (108 loc) · 4.01 KB
/
pr.yml
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
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
markdown-coding-standards:
name: Markdown coding standards
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Coding standards
run: |
docker run --rm --volume "$PWD:/md" peterdavehello/markdownlint markdownlint $(git ls-files *.md)
composer-normalize:
name: composer-normalize
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- run: |
docker network create frontend
docker compose run --user root --rm phpfpm composer install
docker compose run --user root --rm phpfpm composer normalize
coding-standards-phpcs:
name: coding-standards-check/phpcs
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- run: |
docker network create frontend
docker compose run --user root --rm phpfpm composer install
docker compose run --user root --rm phpfpm composer coding-standards-check/phpcs
coding-standards-twig-cs-fixer:
name: coding-standards-check/twig-cs-fixer
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- run: |
docker network create frontend
docker compose run --user root --rm phpfpm composer install
docker compose run --user root --rm phpfpm composer coding-standards-check/twig-cs-fixer
coding-standards-assets:
name: coding-standards-check/assets
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- run: |
docker network create frontend
docker compose run --user root --rm node yarn install
docker compose run --user root --rm node yarn coding-standards-check
install-site:
name: Check that site can be installed
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install site
run: |
docker network create frontend
docker compose pull
docker compose up --detach
# Important: Use --no-interaction to make https://getcomposer.org/doc/06-config.md#discard-changes have effect.
docker compose exec --user root phpfpm composer install --no-interaction
# Install the site
docker compose exec --user root phpfpm vendor/bin/drush site:install --existing-config --yes
# Build theme assets
docker compose run --user root --rm node yarn install
docker compose run --user root --rm node yarn build
- name: Open site
run: |
echo $(docker compose exec phpfpm vendor/bin/drush --uri=http://$(docker compose port nginx 8080) user:login)
config-check:
name: Check that config is up to date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install site
run: |
docker network create frontend
docker compose pull
docker compose up --detach
# Important: Use --no-interaction to make https://getcomposer.org/doc/06-config.md#discard-changes have effect.
docker compose exec --user root phpfpm composer install --no-interaction
# Install the site
docker compose exec --user root phpfpm vendor/bin/drush site:install --existing-config --yes
- name: Export config
run: docker compose exec --user root phpfpm vendor/bin/drush config:export --yes
- name: Check for changes in config
run: git diff --diff-filter=ACMRT --exit-code config/