|
35 | 35 | echo "Using phar url $phar_url" >> output.log 2>&1 |
36 | 36 |
|
37 | 37 | phar_path="${github_action_path}/phpunit.phar" |
38 | | - command_string=("phpunit") |
39 | 38 | curl --silent -H "User-agent: cURL (https://github.com/php-actions)" -L "$phar_url" > "$phar_path" |
40 | 39 | else |
41 | | - echo "Using vendored phpunit: ${phar_path}" >> output.log 2>&1 |
| 40 | + echo "Using vendored phpunit" >> output.log 2>&1 |
42 | 41 | phar_path="${GITHUB_WORKSPACE}/$ACTION_PHPUNIT_PATH" |
43 | | - command_string=($ACTION_PHPUNIT_PATH) |
44 | | -fi |
45 | | - |
46 | | -if [ ! -f "${phar_path}" ] |
47 | | -then |
48 | | - echo "Error: The phpunit binary \"${phar_path}\" does not exist in the project" |
49 | | - exit 1 |
50 | 42 | fi |
51 | 43 |
|
52 | 44 | echo "phar_path=$phar_path" >> output.log 2>&1 |
53 | | - |
54 | | -if [[ ! -x "$phar_path" ]] |
55 | | -then |
56 | | - chmod +x $phar_path || echo "Error: the PHAR must have executable bit set" && exit 1 |
57 | | -fi |
| 45 | +chmod +x $phar_path |
| 46 | +command_string=("phpunit") |
58 | 47 |
|
59 | 48 | if [ -n "$ACTION_CONFIGURATION" ] |
60 | 49 | then |
@@ -174,20 +163,12 @@ echo "Command: ${command_string[@]}" >> output.log 2>&1 |
174 | 163 | me=$(whoami) |
175 | 164 | echo "Current user: $me" |
176 | 165 |
|
177 | | -if [ -z $ACTION_PHPUNIT_PATH ] |
178 | | -then |
179 | | - docker run --rm \ |
180 | | - --volume "${phar_path}":/usr/local/bin/phpunit \ |
181 | | - --volume "${GITHUB_WORKSPACE}":/app \ |
182 | | - --workdir /app \ |
183 | | - --network host \ |
184 | | - --env-file <( env| cut -f1 -d= ) \ |
185 | | - ${docker_tag} "${command_string[@]}" |
186 | | -else |
187 | | - docker run --rm \ |
188 | | - --volume "${GITHUB_WORKSPACE}":/app \ |
189 | | - --workdir /app \ |
190 | | - --network host \ |
191 | | - --env-file <( env| cut -f1 -d= ) \ |
192 | | - ${docker_tag} "/app/${command_string[@]}" |
193 | | -fi |
| 166 | +ls -la |
| 167 | + |
| 168 | +docker run --rm \ |
| 169 | + --volume "${phar_path}":/usr/local/bin/phpunit \ |
| 170 | + --volume "${GITHUB_WORKSPACE}":/app \ |
| 171 | + --workdir /app \ |
| 172 | + --network host \ |
| 173 | + --env-file <( env| cut -f1 -d= ) \ |
| 174 | + ${docker_tag} "${command_string[@]}" |
0 commit comments