From ff5a8bdb576346a228ec97a5029a403b2a9295e4 Mon Sep 17 00:00:00 2001 From: stephanie rousset Date: Mon, 31 Mar 2025 15:28:58 +0200 Subject: [PATCH 1/7] fix: update docker compose command --- Makefile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 69259cec..c926659e 100644 --- a/Makefile +++ b/Makefile @@ -2,38 +2,38 @@ run: up @make create-seeds up: - docker-compose -f docker-compose.local.yml up --build -d + docker compose -f docker-compose.local.yml up --build -d @make setup-database # Stops containers and remove volumes teardown: - docker-compose -f docker-compose.local.yml down -v --rmi all + docker compose -f docker-compose.local.yml down -v --rmi all create-database: - docker-compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rake db:create' + docker compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rake db:create' setup-database: create-database - docker-compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rake db:migrate' + docker compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rake db:migrate' # Create seeds create-seeds: - docker-compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rake db:schema:load db:seed' + docker compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rake db:schema:load db:seed' # Restore dump restore-dump: bundle exec rake restore_dump shell: - docker-compose -f docker-compose.local.yml exec app /bin/bash + docker compose -f docker-compose.local.yml exec app /bin/bash restart: - docker-compose -f docker-compose.local.yml up -d + docker compose -f docker-compose.local.yml up -d rebuild: - docker-compose -f docker-compose.local.yml up --build -d + docker compose -f docker-compose.local.yml up --build -d status: - docker-compose -f docker-compose.local.yml ps + docker compose -f docker-compose.local.yml ps logs: - docker-compose -f docker-compose.local.yml logs app + docker compose -f docker-compose.local.yml logs app From ed3e4d3449600ec9edfab29692e99d7c64ffa426 Mon Sep 17 00:00:00 2001 From: stephanie rousset Date: Mon, 31 Mar 2025 15:31:08 +0200 Subject: [PATCH 2/7] fix: add variable in local storage to prevent pwa prompt --- app/packs/src/decidim/decidim_application.js | 1 + app/packs/src/decidim/disable_pwa_prompt.js | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 app/packs/src/decidim/disable_pwa_prompt.js diff --git a/app/packs/src/decidim/decidim_application.js b/app/packs/src/decidim/decidim_application.js index 8ad5beb0..df19a818 100644 --- a/app/packs/src/decidim/decidim_application.js +++ b/app/packs/src/decidim/decidim_application.js @@ -2,6 +2,7 @@ // as part of that pack import "src/decidim/append_after_action_to_modals" +import "src/decidim/disable_pwa_prompt.js" // Load images require.context("../../images", true) diff --git a/app/packs/src/decidim/disable_pwa_prompt.js b/app/packs/src/decidim/disable_pwa_prompt.js new file mode 100644 index 00000000..0a02b539 --- /dev/null +++ b/app/packs/src/decidim/disable_pwa_prompt.js @@ -0,0 +1,6 @@ +// disable the prompt for pwa +(() => { + if (localStorage.getItem("pwaInstallPromptSeen") !== 'true') { + localStorage.setItem("pwaInstallPromptSeen", true); + } +})(); From 526e8ea587d12caa4378cd29f04fadd6ee1d3409 Mon Sep 17 00:00:00 2001 From: stephanie rousset Date: Mon, 31 Mar 2025 15:57:22 +0200 Subject: [PATCH 3/7] ci: update upload-artifact action --- .github/workflows/ci_cd.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index dc89bb31..e7ab396b 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -93,12 +93,12 @@ jobs: name: RSpec - run: ./.github/upload_coverage.sh decidim-app $GITHUB_EVENT_PATH name: Upload coverage - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: screenshots path: ./spec/tmp/screenshots - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: assets-manifest-${{ matrix.slice }} @@ -158,12 +158,12 @@ jobs: name: RSpec - run: ./.github/upload_coverage.sh decidim-app $GITHUB_EVENT_PATH name: Upload coverage - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: screenshots path: ./spec/tmp/screenshots - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: assets-manifest-${{ matrix.slice }} From 380e219f28b02b27d896becb5c9d1bc38e1aebb2 Mon Sep 17 00:00:00 2001 From: stephanie rousset Date: Mon, 31 Mar 2025 16:06:47 +0200 Subject: [PATCH 4/7] ci: add libu2f-udev & imagemagick --- .github/workflows/ci_cd.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index e7ab396b..22c0a178 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -71,6 +71,8 @@ jobs: with: ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true + - run: sudo apt install libu2f-udev imagemagick + name: install libu2f-udev & imagemagick - uses: actions/setup-node@v3 with: node-version: ${{ env.NODE_VERSION }} @@ -136,6 +138,8 @@ jobs: with: ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true + - run: sudo apt install libu2f-udev imagemagick + name: install libu2f-udev & imagemagick - uses: actions/setup-node@v3 with: node-version: ${{ env.NODE_VERSION }} From 57ce96d57d32c64ec137bf79fa4ea2c567e98cb6 Mon Sep 17 00:00:00 2001 From: stephanie rousset Date: Mon, 31 Mar 2025 16:16:27 +0200 Subject: [PATCH 5/7] ci: update ci again --- .github/workflows/ci_cd.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 22c0a178..ea423c9a 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -71,8 +71,6 @@ jobs: with: ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true - - run: sudo apt install libu2f-udev imagemagick - name: install libu2f-udev & imagemagick - uses: actions/setup-node@v3 with: node-version: ${{ env.NODE_VERSION }} @@ -138,8 +136,8 @@ jobs: with: ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true - - run: sudo apt install libu2f-udev imagemagick - name: install libu2f-udev & imagemagick + - run: sudo apt install imagemagick + name: install imagemagick - uses: actions/setup-node@v3 with: node-version: ${{ env.NODE_VERSION }} From 1456a7009c7ae8ecfe74c3a37fbd1e56ba08b1ff Mon Sep 17 00:00:00 2001 From: stephanie rousset Date: Mon, 31 Mar 2025 16:28:11 +0200 Subject: [PATCH 6/7] ci: try fix ci again --- .github/workflows/ci_cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index ea423c9a..4bbaf233 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -136,8 +136,8 @@ jobs: with: ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true - - run: sudo apt install imagemagick - name: install imagemagick + - run: sudo apt install libu2f-udev imagemagick + name: install libu2f-udev & imagemagick - uses: actions/setup-node@v3 with: node-version: ${{ env.NODE_VERSION }} From ddf8bfe81f8e07e3bf439d1f2742bea111912b17 Mon Sep 17 00:00:00 2001 From: stephanie rousset Date: Mon, 31 Mar 2025 16:41:14 +0200 Subject: [PATCH 7/7] ci: another try to fix ci --- .github/workflows/ci_cd.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 4bbaf233..fd358e59 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -136,7 +136,9 @@ jobs: with: ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true - - run: sudo apt install libu2f-udev imagemagick + - run: | + sudo apt update + sudo apt install libu2f-udev imagemagick name: install libu2f-udev & imagemagick - uses: actions/setup-node@v3 with: