From b30532d670b8780d4ae1ad519aa4bd94b24d88f4 Mon Sep 17 00:00:00 2001 From: Jason Altekruse Date: Tue, 15 Nov 2022 17:11:47 -0600 Subject: [PATCH 1/2] Update php container Dockerfile to point at specific version of composer - add a new npm script to run all tests besides the DoenetML ones - electron runs about 25% faster for me, so I set that as the browser for this new script, to have a quick signal if the app side is likely in a good state. There is a tiny chance chrome behaves differently, but they are both based on Chromium --- doenet_docker/php/Dockerfile | 6 ++++-- package.json | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doenet_docker/php/Dockerfile b/doenet_docker/php/Dockerfile index 078763a826..9b8f07340b 100644 --- a/doenet_docker/php/Dockerfile +++ b/doenet_docker/php/Dockerfile @@ -1,4 +1,6 @@ -FROM composer as composer +# composer:2.2.18 +# https://hub.docker.com/layers/library/composer/2.2.18/images/sha256-7b05f8df23459b8631d50c6720025e7f44ab5072c18ec727f64c100ebd03ead4?context=explore +FROM composer@sha256:7b05f8df23459b8631d50c6720025e7f44ab5072c18ec727f64c100ebd03ead4 as composer WORKDIR /build COPY ./doenet_docker/php/composer.json . RUN composer install --ignore-platform-reqs @@ -26,4 +28,4 @@ RUN docker-php-ext-install mysqli WORKDIR /usr/local/apache2/htdocs/api/ COPY ./src/Api . COPY --from=composer /build/vendor ./vendor -EXPOSE 9000 \ No newline at end of file +EXPOSE 9000 diff --git a/package.json b/package.json index b03f2f475c..ad12b7e524 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "buildx:mysql": "docker buildx build --platform linux/amd64 -f doenet_docker/mysql/Dockerfile -t lyanthropos/doenet_test:mysql-dev .", "test": "cypress open", "test:all": "cypress run -b 'chrome' --config video=false --headless", + "test:app": "cypress run -b 'electron' --config video=false --headless --spec 'cypress/e2e/ActivityViewer/*,cypress/e2e/AsStudent/*,cypress/e2e/Events/*,cypress/e2e/Navigation/*,cypress/e2e/Public/*,cypress/e2e/AssignedActivity/*,cypress/e2e/course/*,cypress/e2e/Editor/*,cypress/e2e/Gradebook/*,cypress/e2e/People/*'", "publish:db": "docker compose exec -T -w /var/lib/mysql mysql mysqldump -u root -phelloworld --databases --add-drop-database --add-drop-table doenet_local > ./doenet_docker/volumes/db_init/db_template.sql", "reset:db": "docker compose exec -T mysql mysql -u root -phelloworld doenet_local < ./doenet_docker/volumes/db_init/db_template.sql", "reset:volumes": "docker volume rm doenet_node_modules doenet_vendor", From b83e7de92dd9fdfc002ca121c3c713a0220cbab0 Mon Sep 17 00:00:00 2001 From: Jason Altekruse Date: Tue, 15 Nov 2022 17:36:57 -0600 Subject: [PATCH 2/2] Better way to exclude DoenetML, will tolerate adding new folders as needed --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ad12b7e524..c239c5bd88 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "buildx:mysql": "docker buildx build --platform linux/amd64 -f doenet_docker/mysql/Dockerfile -t lyanthropos/doenet_test:mysql-dev .", "test": "cypress open", "test:all": "cypress run -b 'chrome' --config video=false --headless", - "test:app": "cypress run -b 'electron' --config video=false --headless --spec 'cypress/e2e/ActivityViewer/*,cypress/e2e/AsStudent/*,cypress/e2e/Events/*,cypress/e2e/Navigation/*,cypress/e2e/Public/*,cypress/e2e/AssignedActivity/*,cypress/e2e/course/*,cypress/e2e/Editor/*,cypress/e2e/Gradebook/*,cypress/e2e/People/*'", + "test:app": "cypress run -b 'electron' --config video=false --headless ignoreTestFiles='cypress/e2e/DoenetML/*'", "publish:db": "docker compose exec -T -w /var/lib/mysql mysql mysqldump -u root -phelloworld --databases --add-drop-database --add-drop-table doenet_local > ./doenet_docker/volumes/db_init/db_template.sql", "reset:db": "docker compose exec -T mysql mysql -u root -phelloworld doenet_local < ./doenet_docker/volumes/db_init/db_template.sql", "reset:volumes": "docker volume rm doenet_node_modules doenet_vendor",