-
Notifications
You must be signed in to change notification settings - Fork 1
112 lines (92 loc) · 3.29 KB
/
pr.yaml
File metadata and controls
112 lines (92 loc) · 3.29 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
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
on: pull_request
name: Review
jobs:
validate-compose:
runs-on: ubuntu-latest
env: &env
# All environment variables that require a non-empty value in our compose
# files (cf.
# https://docs.docker.com/reference/compose-file/interpolation/)
COMPOSE_DOMAIN: test.local.example.org
COMPOSE_PROJECT_NAME: test_project
COMPOSE_SERVER_DOMAIN: test.example.org
TERM: xterm-256color
strategy:
fail-fast: false
matrix:
version: &template_version
- drupal
- drupal-8
- drupal-9
- drupal-10
- drupal-11
- symfony
- symfony-6
- symfony-7
- symfony-8
name: Validate compose (${{ matrix.version }})
steps:
- uses: actions/checkout@v5
- name: Validate local docker compose files
run: |
docker compose --file templates/${{ matrix.version }}/docker-compose.yml config
- name: Validate server docker compose files
run: |
docker compose --file templates/${{ matrix.version }}/docker-compose.server.yml config
docker compose --file templates/${{ matrix.version }}/docker-compose.server.yml --file templates/${{ matrix.version }}/docker-compose.dev.yml config
docker compose --file templates/${{ matrix.version }}/docker-compose.server.yml --file templates/${{ matrix.version }}/docker-compose.redirect.yml config
validate-nginx-conf:
runs-on: ubuntu-latest
env: *env
strategy:
fail-fast: false
matrix:
version: *template_version
compose_file:
- docker-compose.yml
- docker-compose.server.yml
name: Validate nginx conf (${{ matrix.version }}/${{ matrix.compose_file}})
steps:
- uses: actions/checkout@v5
- name: Create docker network
run: |
docker network create frontend
- name: Validate nginx conf
run: |
docker compose --file templates/${{ matrix.version }}/${{ matrix.compose_file}} run --rm nginx nginx -t
test-template-install:
runs-on: ubuntu-latest
env: *env
strategy:
fail-fast: false
matrix:
version: *template_version
name: Test template install (${{ matrix.version }})
steps:
- uses: actions/checkout@v5
- name: Install and check template
run: |
script_dir="$PWD/scripts"
test_dir="tmp/${{ matrix.version }}"
mkdir -p "$test_dir"
cd "$test_dir"
yes | "$script_dir/itkdev-docker-compose" template:install "${{ matrix.version }}" || true
# Remove .env file generated during template install
rm .env
cd -
pwd
# Check that we have no symlinks in the project.
find "$test_dir" -type l | grep . && exit 1
# Check that project files are exact copies of the template files.
diff -qr templates/"${{ matrix.version }}" "$test_dir"
rm -fr "$(dirname "$test_dir")"
check-bash-completion:
runs-on: ubuntu-latest
name: Check that Bash completion is up to date
steps:
- uses: actions/checkout@v5
- uses: go-task/setup-task@v1
- name: Build completion
run: task completion:build
- name: Check that nothing has changed
run: git diff --exit-code