Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
pablothedude committed Jan 9, 2025
1 parent 3fc8be8 commit a12df35
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 30 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/run-cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: |
cd docker &&
${DOCKER_COMPOSE} up -d --build &&
docker compose exec -T --user www-data php-fpm.dev.openconext.local bash -c '
docker compose exec -T --user www-data engine.dev.openconext.local bash -c '
SYMFONY_ENV=ci composer install --prefer-dist -n -o --ignore-platform-reqs && \
./app/console cache:clear --env=ci && \
cd theme && CYPRESS_INSTALL_BINARY=0 yarn install --frozen-lockfile && EB_THEME=skeune yarn build
Expand All @@ -38,13 +38,13 @@ jobs:
if: always()
run: |
cd docker && \
docker compose exec -T --user www-data php-fpm.dev.openconext.local bash -c '
docker compose exec -T --user www-data engine.dev.openconext.local bash -c '
EB_THEME=skeune ./theme/scripts/prepare-test.js
' && \
docker compose exec -T cypress bash -c '
cd e2e && yarn install && cypress run --spec cypress/integration/skeune/**/*.spec.js,cypress/integration/shared/*.spec.js --browser=chrome --headless
' && \
docker compose exec -T --user www-data php-fpm.dev.openconext.local bash -c '
docker compose exec -T --user www-data engine.dev.openconext.local bash -c '
EB_THEME=openconext ./theme/scripts/prepare-test.js
' && \
docker compose exec -T cypress bash -c '
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ jobs:
run: |
cd docker &&
${DOCKER_COMPOSE} up -d --build &&
docker compose exec -T --user www-data php-fpm.dev.openconext.local bash -c '
docker compose exec -T --user www-data engine.dev.openconext.local bash -c '
SYMFONY_ENV=ci composer install --prefer-dist -n -o --ignore-platform-reqs && \
./app/console cache:clear --env=ci && \
cd theme && CYPRESS_INSTALL_BINARY=0 yarn install --frozen-lockfile && EB_THEME=skeune yarn build
'
- name: Run code quality tests
if: always()
run: |
cd docker && docker compose exec -T --user www-data php-fpm.dev.openconext.local bash -c '
cd docker && docker compose exec -T --user www-data engine.dev.openconext.local bash -c '
echo -e "\nPHP Mess Detector\n" && \
./vendor/bin/phpmd src text ci/qa-config/phpmd.xml --exclude */Tests/* && \
echo -e "\nPHP CodeSniffer\n" && \
Expand All @@ -52,7 +52,7 @@ jobs:
- name: Run unit tests
if: always()
run: |
cd docker && APP_ENV=ci SYMFONY_ENV=ci docker compose exec -T --user www-data php-fpm.dev.openconext.local bash -c '
cd docker && APP_ENV=ci SYMFONY_ENV=ci docker compose exec -T --user www-data engine.dev.openconext.local bash -c '
echo -e "\nInstalling database fixtures...\n" && \
./app/console doctrine:schema:drop --force --env=ci && \
./app/console doctrine:schema:create --env=ci && \
Expand All @@ -70,7 +70,7 @@ jobs:
- name: Run acceptance tests
if: always()
run: |
cd docker && docker compose exec -T --user www-data php-fpm.dev.openconext.local bash -c '
cd docker && docker compose exec -T --user www-data engine.dev.openconext.local bash -c '
echo -e "\nInstalling database fixtures...\n" && \
./app/console doctrine:schema:drop --force --env=ci && \
./app/console doctrine:schema:create --env=ci && \
Expand All @@ -86,7 +86,7 @@ jobs:
- name: Run linting tests
if: always()
run: |
cd docker && docker compose exec -T --user www-data php-fpm.dev.openconext.local bash -c '
cd docker && docker compose exec -T --user www-data engine.dev.openconext.local bash -c '
echo -e "\nTwig lint\n" && \
app/console lint:twig theme/ && \
cd theme && \
Expand All @@ -98,7 +98,7 @@ jobs:
- name: Show log on failure
if: failure()
run: |
cd docker && docker compose exec -T php-fpm.dev.openconext.local cat /var/www/html/app/logs/ci/ci.log
cd docker && docker compose exec -T engine.dev.openconext.local cat /var/www/html/app/logs/ci/ci.log
- name: Send notification on production build nightly build failure
uses: sonots/slack-notice-action@v3
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
FROM ghcr.io/openconext/openconext-basecontainers/php72-apache2-node16-composer2:latest
RUN a2enmod ssl
# Copy phpfpm config
COPY docker/php-fpm/app.ini /usr/local/etc/php/conf.d/
COPY docker/ci/app.ini /usr/local/etc/php/conf.d/
RUN rm -rf /etc/apache2/sites-enabled/*
COPY docker/php-fpm/apache2.conf /etc/apache2/sites-enabled/
COPY docker/ci/apache2.conf /etc/apache2/sites-enabled/
RUN chown -R www-data: /var/www/
WORKDIR /var/www/html

# Copy keys and config
COPY ci/qa-config/files/ /etc/openconext
EXPOSE 443
CMD ["apache2-foreground"]

Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ FROM ghcr.io/openconext/openconext-basecontainers/php82-apache2-node16-composer2
RUN a2enmod ssl


COPY docker/php-fpm/app.ini /usr/local/etc/php/conf.d/
COPY docker/php-fpm/apache2.conf /etc/apache2/sites-enabled/
COPY docker/ci/app.ini /usr/local/etc/php/conf.d/
COPY docker/ci/apache2.conf /etc/apache2/sites-enabled/
RUN chown -R www-data: /var/www/
WORKDIR /var/www/html

# Copy keys and config
COPY ci/qa-config/files/ /etc/openconext
EXPOSE 443
CMD ["apache2-foreground"]

File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions docker/docker-compose-php72.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: '2.4'

services:
php-fpm.dev.openconext.local:
engine.dev.openconext.local:
build:
dockerfile: docker/php-fpm/Dockerfile-php72
dockerfile: docker/ci/Dockerfile-php72
4 changes: 2 additions & 2 deletions docker/docker-compose-php82.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: '2.4'

services:
php-fpm.dev.openconext.local:
engine.dev.openconext.local:
build:
dockerfile: docker/php-fpm/Dockerfile-php82
dockerfile: docker/ci/Dockerfile-php82
10 changes: 2 additions & 8 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ services:
retries: 20
interval: 2s

php-fpm.dev.openconext.local:
engine.dev.openconext.local:
build:
context: ../
# override this in a dedicated dockerfile per php version
# dockerfile: docker/php-fpm/Dockerfile
# dockerfile: docker/ci/Dockerfile
container_name: eb-phpfpm
volumes:
- ../:/var/www/html
Expand All @@ -52,15 +52,9 @@ services:
condition: service_healthy
db-test.dev.openconext.local:
condition: service_healthy
extra_hosts:
- 'engine.dev.openconext.local: 127.0.0.1'
environment:
APP_ENV: ci
SYMFONY_ENV: ci
networks:
default:
aliases:
- engine.dev.openconext.local

selenium.dev.openconext.local:
image: selenium/standalone-chrome:2.53.1
Expand Down
2 changes: 1 addition & 1 deletion theme/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ This script changes the Twig theme and builds the chosen frontend theme assets.
$ EB_THEME=skeune ./scripts/prepare-test.js
```

The script must be run on the php-fpm instance on your CI environment as it also clears the application cache in order to let the correct Twig templates to be included in the cache.
The script must be run on the engine instance on your CI environment as it also clears the application cache in order to let the correct Twig templates to be included in the cache.

### Writing your own custom theme:

Expand Down

0 comments on commit a12df35

Please sign in to comment.