File tree Expand file tree Collapse file tree 4 files changed +50
-6
lines changed
Expand file tree Collapse file tree 4 files changed +50
-6
lines changed Original file line number Diff line number Diff line change 1+ FROM php:7.4-alpine3.13
2+
3+ RUN mkdir /app
4+
5+ WORKDIR /app
6+
7+ # Install Git, NPM & needed libraries
8+ RUN apk update \
9+ && apk add bash git nodejs npm gettext subversion mysql mysql-client zip \
10+ && rm -f /var/cache/apk/*
11+
12+ RUN docker-php-ext-install mysqli
13+
14+ # Install Composer
15+ RUN EXPECTED_CHECKSUM=$(curl -s https://composer.github.io/installer.sig) \
16+ && curl https://getcomposer.org/installer -o composer-setup.php \
17+ && ACTUAL_CHECKSUM="$(php -r " echo hash_file('sha384' , 'composer-setup.php' );")" \
18+ && if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]; then >&2 echo 'ERROR: Invalid installer checksum' ; rm composer-setup.php; exit 1; fi \
19+ && php composer-setup.php --quiet \
20+ && php -r "unlink('composer-setup.php');" \
21+ && mv composer.phar /usr/local/bin/composer
22+
23+ RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && \
24+ chmod +x wp-cli.phar && \
25+ mv wp-cli.phar /usr/local/bin/wp
26+
27+ RUN chmod +x -R ./
Original file line number Diff line number Diff line change 3232 "installer-name" : " activitypub"
3333 },
3434 "scripts" : {
35- "test" : [
36- " composer install" ,
37- " bin/install-wp-tests.sh wordpress wordpress wordpress " ,
38- " vendor/bin/phpunit"
39- ]
35+ "test" : [
36+ " composer install" ,
37+ " bin/install-wp-tests.sh activitypub-test root activitypub-test test-db latest true " ,
38+ " vendor/bin/phpunit"
39+ ]
4040 }
4141}
Original file line number Diff line number Diff line change 1+ version : ' 2'
2+ services :
3+ test-db :
4+ image : mysql:5.7
5+ environment :
6+ MYSQL_DATABASE : activitypub-test
7+ MYSQL_ROOT_PASSWORD : activitypub-test
8+
9+ test-php :
10+ build :
11+ context : .
12+ dockerfile : Dockerfile
13+ links :
14+ - test-db
15+ volumes :
16+ - .:/app
17+ command : ["composer", "run-script", "test"]
Original file line number Diff line number Diff line change 77 convertWarningsToExceptions=" true"
88 >
99 <testsuites >
10- <testsuite >
10+ <testsuite name = " ActivityPub " >
1111 <directory prefix =" test-" suffix =" .php" >./tests/</directory >
1212 </testsuite >
1313 </testsuites >
You can’t perform that action at this time.
0 commit comments