mirror of
https://github.com/opdavies/build-configs.git
synced 2025-02-09 00:25:01 +00:00
Re-add examples
This commit is contained in:
parent
579c476a54
commit
4e885eea91
1
examples/php-full/.env.example
Normal file
1
examples/php-full/.env.example
Normal file
|
@ -0,0 +1 @@
|
||||||
|
export COMPOSE_PROJECT_NAME=php-full
|
36
examples/php-full/Dockerfile
Normal file
36
examples/php-full/Dockerfile
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
FROM php:8.1-cli-bullseye AS base
|
||||||
|
|
||||||
|
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
||||||
|
RUN which composer && composer -V
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
ENV PATH="${PATH}:/app/vendor/bin"
|
||||||
|
|
||||||
|
COPY composer.* ./
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
FROM base AS build
|
||||||
|
|
||||||
|
|
||||||
|
RUN apt-get update -yqq \
|
||||||
|
&& apt-get install -yqq --no-install-recommends \
|
||||||
|
git unzip
|
||||||
|
|
||||||
|
|
||||||
|
RUN composer install
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
FROM base AS test
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN phpunit --testdox
|
||||||
|
|
||||||
|
|
25
examples/php-full/build.yaml
Normal file
25
examples/php-full/build.yaml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
name: php-full
|
||||||
|
type: drupal
|
||||||
|
|
||||||
|
dockerfile:
|
||||||
|
stages:
|
||||||
|
build:
|
||||||
|
extends: base
|
||||||
|
packages:
|
||||||
|
- git
|
||||||
|
- unzip
|
||||||
|
commands:
|
||||||
|
- composer install
|
||||||
|
|
||||||
|
test:
|
||||||
|
extends: base
|
||||||
|
commands:
|
||||||
|
- phpunit --testdox
|
||||||
|
|
||||||
|
php:
|
||||||
|
version: 8.1-cli-bullseye
|
||||||
|
phpstan:
|
||||||
|
level: 7
|
||||||
|
paths:
|
||||||
|
- app
|
||||||
|
- src
|
7
examples/php-full/phpcs.xml.dist
Normal file
7
examples/php-full/phpcs.xml.dist
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<ruleset name="php-full coding standards">
|
||||||
|
<description>PHPCS configuration file for php-full.</description>
|
||||||
|
<file>src</file>
|
||||||
|
<arg value="np"/>
|
||||||
|
<rule ref=""/>
|
||||||
|
</ruleset>
|
6
examples/php-full/phpstan.neon.dist
Normal file
6
examples/php-full/phpstan.neon.dist
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
parameters:
|
||||||
|
level: 7
|
||||||
|
paths:
|
||||||
|
- app
|
||||||
|
- src
|
||||||
|
|
20
examples/php-full/phpunit.xml.dist
Normal file
20
examples/php-full/phpunit.xml.dist
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
|
||||||
|
bootstrap="vendor/autoload.php"
|
||||||
|
cacheResultFile=".phpunit.cache/test-results"
|
||||||
|
executionOrder="depends,defects"
|
||||||
|
forceCoversAnnotation="false"
|
||||||
|
beStrictAboutCoversAnnotation="true"
|
||||||
|
beStrictAboutOutputDuringTests="false"
|
||||||
|
beStrictAboutTodoAnnotatedTests="true"
|
||||||
|
convertDeprecationsToExceptions="true"
|
||||||
|
failOnRisky="true"
|
||||||
|
failOnWarning="true"
|
||||||
|
verbose="true">
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="php-full">
|
||||||
|
<directory>tests</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
</phpunit>
|
1
examples/php-simple/.env.example
Normal file
1
examples/php-simple/.env.example
Normal file
|
@ -0,0 +1 @@
|
||||||
|
export COMPOSE_PROJECT_NAME=php-simple
|
14
examples/php-simple/Dockerfile
Normal file
14
examples/php-simple/Dockerfile
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
FROM php:8.1-cli-bullseye AS base
|
||||||
|
|
||||||
|
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
||||||
|
RUN which composer && composer -V
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
ENV PATH="${PATH}:/app/vendor/bin"
|
||||||
|
|
||||||
|
COPY composer.* ./
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
4
examples/php-simple/build.yaml
Normal file
4
examples/php-simple/build.yaml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
name: php-simple
|
||||||
|
type: php-library
|
||||||
|
php:
|
||||||
|
version: 8.1-cli-bullseye
|
7
examples/php-simple/phpcs.xml.dist
Normal file
7
examples/php-simple/phpcs.xml.dist
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<ruleset name="php-simple coding standards">
|
||||||
|
<description>PHPCS configuration file for php-simple.</description>
|
||||||
|
<file>src</file>
|
||||||
|
<arg value="np"/>
|
||||||
|
<rule ref=""/>
|
||||||
|
</ruleset>
|
5
examples/php-simple/phpstan.neon.dist
Normal file
5
examples/php-simple/phpstan.neon.dist
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
parameters:
|
||||||
|
level:
|
||||||
|
paths:
|
||||||
|
- src
|
||||||
|
|
20
examples/php-simple/phpunit.xml.dist
Normal file
20
examples/php-simple/phpunit.xml.dist
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
|
||||||
|
bootstrap="vendor/autoload.php"
|
||||||
|
cacheResultFile=".phpunit.cache/test-results"
|
||||||
|
executionOrder="depends,defects"
|
||||||
|
forceCoversAnnotation="false"
|
||||||
|
beStrictAboutCoversAnnotation="true"
|
||||||
|
beStrictAboutOutputDuringTests="false"
|
||||||
|
beStrictAboutTodoAnnotatedTests="true"
|
||||||
|
convertDeprecationsToExceptions="true"
|
||||||
|
failOnRisky="true"
|
||||||
|
failOnWarning="true"
|
||||||
|
verbose="true">
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="php-simple">
|
||||||
|
<directory>tests</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
</phpunit>
|
Loading…
Reference in a new issue