File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -65,15 +65,21 @@ jobs:
65
65
Some packages may require additional setup steps: setting up a web server to test an HTTP client, seeding a database or cache service, etc.
66
66
Other times, you may want to do additional reporting, particularly if the QA command failed.
67
67
68
- To enable this, you may create one or both of the following files in your package:
68
+ To enable this, you may create one or more of the following files in your package:
69
69
70
- - ` .laminas-ci/pre-run.sh`
70
+ - ` .laminas-ci/pre-install.sh`
71
+ - ` .laminas-ci/pre-run.sh`
71
72
- ` .laminas-ci/post-run.sh`
72
73
73
74
(Note : the files MUST be executable to be consumed!)
74
75
75
- These run immediately before and after the QA command, respectively.
76
- The `.laminas-ci/pre-run.sh` command will receive the following arguments :
76
+ The `.laminas-ci/pre-install.sh` command runs before any other command is executed in the action, and will receive the following arguments :
77
+
78
+ - `$1` : the user the QA command will run under
79
+ - `$2` : the WORKDIR path
80
+ - `$3` : the `$JOB` passed to the entrypoint (see above)
81
+
82
+ The `.laminas-ci/pre-run.sh` command runs immediately prior to the QA command, and will receive the following arguments :
77
83
78
84
- `$1` : the user the QA command will run under
79
85
- `$2` : the WORKDIR path
Original file line number Diff line number Diff line change @@ -124,6 +124,15 @@ if [[ "${COMMAND}" == "" ]];then
124
124
exit 1
125
125
fi
126
126
127
+ echo " Marking PHP ${PHP} as configured default"
128
+ update-alternatives --set php /usr/bin/php${PHP}
129
+
130
+ # Is there a pre-install script available?
131
+ if [ -x " .laminas-ci/pre-install.sh" ]; then
132
+ echo " Executing pre-install commands from .laminas-ci/pre-install.sh"
133
+ ./.laminas-ci/pre-install.sh testuser " ${PWD} " " ${JOB} "
134
+ fi
135
+
127
136
EXTENSIONS=$( echo " ${JOB} " | jq -r " .extensions | map(\" php${PHP} -\" +.) | join(\" \" )" )
128
137
INI=$( echo " ${JOB} " | jq -r ' .ini | join("{NL}")' )
129
138
DEPS=$( echo " ${JOB} " | jq -r ' .dependencies' )
@@ -154,9 +163,6 @@ if [[ "${INI}" != "" ]];then
154
163
echo $INI | sed " s/{NL}/\n/g" > /etc/php/${PHP} /cli/conf.d/99-settings.ini
155
164
fi
156
165
157
- echo " Marking PHP ${PHP} as configured default"
158
- update-alternatives --set php /usr/bin/php${PHP}
159
-
160
166
echo " PHP version: $( php --version) "
161
167
echo " Installed extensions:"
162
168
php -m
You can’t perform that action at this time.
0 commit comments