-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate travis github actions #571
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ on: | |
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,64 +9,89 @@ on: | |
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-20.04 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why run the tests on the old Ubuntu LTS? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See previous comment |
||
timeout-minutes: 30 | ||
env: | ||
DOCKER_COMPOSE: docker-compose -f docker-compose.yml -f docker-compose-ci.yml | ||
DOCKER_COMPOSE_PHP_FPM: docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T php-fpm | ||
DOCKER_COMPOSE_OPENCONEXT: docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T openconext | ||
DOCKER_COMPOSE_CYPRESS: docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T cypress | ||
|
||
steps: | ||
|
||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Start the docker images for Cypress testing | ||
run: docker-compose -f docker-compose.yml -f docker-compose-ci.yml up -d | ||
|
||
- name: Import the certificate on the Cypress docker machine | ||
run: docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T cypress sh /e2e/docker/conf/cypress_import_cert.sh | ||
|
||
- name: Run composer | ||
run: | | ||
docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T php-fpm /usr/local/bin/composer install -n --prefer-dist -o --ignore-platform-reqs | ||
env: | ||
SYMFONY_ENV: dev | ||
|
||
- name: Run yarn | ||
run: | | ||
docker run -v ${PWD}:/var/www/html -w /var/www/html node:14 yarn install | ||
env: | ||
SYMFONY_ENV: dev | ||
|
||
- name: Create front end dependencies (yarn encore production) | ||
run: | | ||
docker run -v ${PWD}:/var/www/html -w /var/www/html node:14 yarn run encore production | ||
env: | ||
SYMFONY_ENV: dev | ||
|
||
- name: Get the database up and running | ||
run: | | ||
docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T php-fpm bin/console doctrine:migrations:migrate | ||
env: | ||
SYMFONY_ENV: dev | ||
|
||
- name: Remove leftover files | ||
run: | | ||
docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T php-fpm /bin/rm -rf /tmp/sp-dashboard/ /tmp/sp-dashboard-sessions/ | ||
|
||
- name: Make the log and cache dir writable | ||
run: | | ||
docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T php-fpm chmod 777 /var/www/html/var/{logs,cache} | ||
|
||
- name: Copy parameters.yml.dist to parameters.yml | ||
run: | | ||
docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T php-fpm cp /var/www/html/app/config/parameters.yml.dist /var/www/html/app/config/parameters.yml | ||
|
||
- name: Wait until the spdashboard is accessable | ||
run: | | ||
docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T openconext sh /usr/local/sbin/spdup.sh | ||
|
||
- name: Disable Symfony debug mode | ||
run: | | ||
docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T php-fpm sed -i s/\'dev\',\ true/\'dev\',\ false/g /var/www/html/web/app_dev.php | ||
|
||
- name: Run cypress tests | ||
run: docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T cypress cypress run --browser chrome | ||
continue-on-error: true | ||
|
||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Start the docker images for testing | ||
run: ${DOCKER_COMPOSE} up -d | ||
|
||
- name: Import the certificate on the Cypress docker machine | ||
run: ${DOCKER_COMPOSE_CYPRESS} sh /e2e/docker/conf/cypress_import_cert.sh | ||
|
||
- name: Run composer | ||
run: | | ||
${DOCKER_COMPOSE_PHP_FPM} /usr/local/bin/composer install -n --prefer-dist -o --ignore-platform-reqs | ||
env: | ||
SYMFONY_ENV: dev | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we run the application in |
||
|
||
- name: Run yarn | ||
run: | | ||
docker run -v ${PWD}:/var/www/html -w /var/www/html node:14 yarn install | ||
env: | ||
SYMFONY_ENV: dev | ||
|
||
- name: Create front end dependencies (yarn encore production) | ||
run: | | ||
docker run -v ${PWD}:/var/www/html -w /var/www/html node:14 yarn run encore production | ||
env: | ||
SYMFONY_ENV: dev | ||
|
||
- name: Get the database up and running | ||
run: | | ||
${DOCKER_COMPOSE_PHP_FPM} bin/console doctrine:migrations:migrate | ||
env: | ||
SYMFONY_ENV: dev | ||
|
||
- name: Remove leftover files | ||
run: | | ||
${DOCKER_COMPOSE_PHP_FPM} /bin/rm -rf /tmp/sp-dashboard/ /tmp/sp-dashboard-sessions/ | ||
|
||
- name: Make the log and cache dir writable | ||
run: | | ||
${DOCKER_COMPOSE_PHP_FPM} chmod 777 /var/www/html/var/{logs,cache} | ||
|
||
- name: Copy parameters.yml.dist to parameters.yml | ||
run: | | ||
${DOCKER_COMPOSE_PHP_FPM} cp /var/www/html/app/config/parameters.yml.dist /var/www/html/app/config/parameters.yml | ||
|
||
- name: Wait until the spdashboard is accessable | ||
run: | | ||
${DOCKER_COMPOSE_OPENCONEXT} sh /usr/local/sbin/spdup.sh | ||
|
||
- name: Disable Symfony debug mode | ||
run: | | ||
${DOCKER_COMPOSE_PHP_FPM} sh -c 'composer disabledebug' | ||
|
||
- name: Run Copy Paste Detector | ||
run: | | ||
${DOCKER_COMPOSE_PHP_FPM} sh -c 'composer jscpd' | ||
continue-on-error: true | ||
|
||
- name: Run CI tests | ||
run: | | ||
${DOCKER_COMPOSE_PHP_FPM} sh -c 'composer check' | ||
Comment on lines
+75
to
+82
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd say: make the jscpd part of the composer check (Run CI tests) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have deliberately chosen to keep it out of the CI tests for now, otherwise it breaks the CI tests. Or is there a way to continue anyway? |
||
|
||
- name: Run audits | ||
run: | | ||
${DOCKER_COMPOSE_PHP_FPM} sh -c 'composer security' | ||
continue-on-error: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm skeptical as to allow a failing yarn/composer audit.. I thik you should remove this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes..., but a lot of critical and high risk vulnerabilities found, that need to be fixed in the end, I guess (during upgrade SF?) |
||
|
||
- name: Run Cypress tests | ||
run: | | ||
${DOCKER_COMPOSE_CYPRESS} cypress run --browser chrome | ||
continue-on-error: true | ||
|
||
- name: Run translations | ||
run: | | ||
${DOCKER_COMPOSE_PHP_FPM} sh -c 'composer translations' | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env sh | ||
|
||
cd $(dirname $0)/../ | ||
|
||
./bin/console lexik:translations:import | ||
./bin/console lexik:translations:import DashboardBundle | ||
./bin/console lexik:translations:import DashboardSamlBundle |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env sh | ||
# attributes data check | ||
|
||
cd $(dirname $0)/../../ | ||
|
||
# https://www.npmjs.com/package/ajv-cli | ||
./node_modules/.bin/ajv validate -s app/Resources/schemas/attributes.scheme.json -d app/config/attributes.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, due to the cgroups v1 issue see the fix of @quartje at 3794e8c