Skip to content

Commit 6aaad49

Browse files
author
Greg Bowler
authored
Revert "Fix vendored phpunit issue (Fixes #51) (#67)" (#70)
This reverts commit 69225c0.
1 parent 69225c0 commit 6aaad49

File tree

1 file changed

+12
-31
lines changed

1 file changed

+12
-31
lines changed

phpunit-action.bash

+12-31
Original file line numberDiff line numberDiff line change
@@ -35,26 +35,15 @@ then
3535
echo "Using phar url $phar_url" >> output.log 2>&1
3636

3737
phar_path="${github_action_path}/phpunit.phar"
38-
command_string=("phpunit")
3938
curl --silent -H "User-agent: cURL (https://github.com/php-actions)" -L "$phar_url" > "$phar_path"
4039
else
41-
echo "Using vendored phpunit: ${phar_path}" >> output.log 2>&1
40+
echo "Using vendored phpunit" >> output.log 2>&1
4241
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
5042
fi
5143

5244
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")
5847

5948
if [ -n "$ACTION_CONFIGURATION" ]
6049
then
@@ -174,20 +163,12 @@ echo "Command: ${command_string[@]}" >> output.log 2>&1
174163
me=$(whoami)
175164
echo "Current user: $me"
176165

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

Comments
 (0)