-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Juan Manuel "Kang" Perez
committed
Mar 19, 2024
1 parent
8e91faa
commit 3a76091
Showing
3 changed files
with
142 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,87 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- 'docker/**' | ||
pull_request: | ||
paths-ignore: | ||
- 'docker/**' | ||
|
||
env: | ||
COMPOSER_ALLOW_SUPERUSER: '1' | ||
SYMFONY_DEPRECATIONS_HELPER: max[self]=0 | ||
ADMIN_LOGIN: admin | ||
ADMIN_PASSWORD: test | ||
DATABASE_URL: mysql://user:password@mysql:3306/test_db | ||
COMPOSER_ALLOW_SUPERUSER: '1' | ||
SYMFONY_DEPRECATIONS_HELPER: max[self]=0 | ||
ADMIN_LOGIN: admin | ||
ADMIN_PASSWORD: test | ||
DATABASE_URL: mysql://user:password@mysql:3306/test_db | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
container: | ||
image: php:8.2-alpine | ||
options: >- | ||
--tmpfs /tmp:exec | ||
--tmpfs /var/tmp:exec | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install GD PHP extension | ||
run: | | ||
apk add $PHPIZE_DEPS libpng-dev | ||
docker-php-ext-configure gd | ||
docker-php-ext-install gd | ||
- name: Install Composer | ||
run: wget -qO - https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --quiet | ||
- name: Validate Composer | ||
run: composer validate | ||
- name: Update to highest dependencies with Composer | ||
run: composer update --no-interaction --no-progress --ansi | ||
- name: Analyze | ||
run: PHP_CS_FIXER_IGNORE_ENV=True vendor/bin/php-cs-fixer fix --ansi | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
container: | ||
image: php:8.2-alpine | ||
options: >- | ||
--tmpfs /tmp:exec | ||
--tmpfs /var/tmp:exec | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install GD PHP extension | ||
run: | | ||
apk add $PHPIZE_DEPS libpng-dev | ||
docker-php-ext-configure gd | ||
docker-php-ext-install gd | ||
- name: Install Composer | ||
run: wget -qO - https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --quiet | ||
- name: Validate Composer | ||
run: composer validate | ||
- name: Update to highest dependencies with Composer | ||
run: composer update --no-interaction --no-progress --ansi | ||
- name: Analyze | ||
run: PHP_CS_FIXER_IGNORE_ENV=True vendor/bin/php-cs-fixer fix --ansi | ||
|
||
phpunit: | ||
name: PHPUnit (PHP ${{ matrix.php }}) | ||
runs-on: ubuntu-latest | ||
container: | ||
image: php:${{ matrix.php }}-alpine | ||
options: >- | ||
--tmpfs /tmp:exec | ||
--tmpfs /var/tmp:exec | ||
services: | ||
mysql: | ||
image: mariadb:10.7 | ||
env: | ||
MYSQL_DATABASE: test_db | ||
MYSQL_USER: user | ||
MYSQL_PASSWORD: password | ||
MYSQL_ROOT_PASSWORD: root | ||
options: >- | ||
--health-cmd "mysqladmin ping" | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 3306:3306 | ||
strategy: | ||
matrix: | ||
php: | ||
- '8.0' | ||
- '8.1' | ||
- '8.2' | ||
fail-fast: false | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install MySQL / GD PHP extensions | ||
run: | | ||
apk add $PHPIZE_DEPS icu-libs icu-dev libpng-dev | ||
docker-php-ext-configure intl | ||
docker-php-ext-configure gd | ||
docker-php-ext-install pdo pdo_mysql intl gd | ||
- name: Install Composer | ||
run: wget -qO - https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --quiet | ||
- name: Install dependencies with Composer | ||
run: composer install --no-progress --no-interaction --ansi | ||
- name: Migrate database | ||
run: bin/console doctrine:schema:update --force --no-interaction --complete | ||
- name: Run tests with PHPUnit | ||
run: vendor/bin/phpunit --process-isolation --colors=always | ||
phpunit: | ||
name: PHPUnit (PHP ${{ matrix.php }}) | ||
runs-on: ubuntu-latest | ||
container: | ||
image: php:${{ matrix.php }}-alpine | ||
options: >- | ||
--tmpfs /tmp:exec | ||
--tmpfs /var/tmp:exec | ||
services: | ||
mysql: | ||
image: mariadb:10.7 | ||
env: | ||
MYSQL_DATABASE: test_db | ||
MYSQL_USER: user | ||
MYSQL_PASSWORD: password | ||
MYSQL_ROOT_PASSWORD: root | ||
options: >- | ||
--health-cmd "mysqladmin ping" | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 3306:3306 | ||
strategy: | ||
matrix: | ||
php: | ||
- '8.0' | ||
- '8.1' | ||
- '8.2' | ||
fail-fast: false | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install MySQL / GD PHP extensions | ||
run: | | ||
apk add $PHPIZE_DEPS icu-libs icu-dev libpng-dev | ||
docker-php-ext-configure intl | ||
docker-php-ext-configure gd | ||
docker-php-ext-install pdo pdo_mysql intl gd | ||
- name: Install Composer | ||
run: wget -qO - https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --quiet | ||
- name: Install dependencies with Composer | ||
run: composer install --no-progress --no-interaction --ansi | ||
- name: Migrate database | ||
run: bin/console doctrine:schema:update --force --no-interaction --complete | ||
- name: Run tests with PHPUnit | ||
run: vendor/bin/phpunit --process-isolation --colors=always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,10 +88,6 @@ FROM base-image | |
ARG fpm_user=82:82 | ||
ENV FPM_USER=${fpm_user} | ||
|
||
LABEL org.opencontainers.image.authors="[email protected]" | ||
LABEL org.opencontainers.image.url="https://github.com/tchapi/davis/pkgs/container/davis-standalone" | ||
LABEL org.opencontainers.image.description="A simple, fully translatable admin interface for sabre/dav based on Symfony 5 and Bootstrap 4 (Standalone version with reverse-proxy)" | ||
|
||
COPY --from=extension-builder /usr/local/etc/php/conf.d /usr/local/etc/php/conf.d/ | ||
COPY --from=extension-builder /usr/local/lib/php/extensions /usr/local/lib/php/extensions/ | ||
COPY --from=composer /var/www/davis/vendor /var/www/davis/vendor/ | ||
|