diff --git a/.github/workflows/tests-axe.yml b/.github/workflows/tests-axe.yml index 7a386762e2..15a62c5954 100644 --- a/.github/workflows/tests-axe.yml +++ b/.github/workflows/tests-axe.yml @@ -40,15 +40,7 @@ jobs: role-to-assume: ${{ secrets.AWS_ROLE_ARN }} aws-region: us-east-1 mask-aws-account-id: true - - run: npm install --ignore-scripts - - name: docker compose up - run: docker compose --file deploy/dev-standalone.yml up --detach --wait - - uses: docker://mcr.microsoft.com/playwright:v1.42.1-jammy - with: - args: npx playwright test axe - env: - CI: true - HOME: /root + - run: docker compose --file deploy/local.yml run a11y-test - uses: actions/upload-artifact@v4 if: always() with: @@ -56,8 +48,5 @@ jobs: path: playwright-report retention-days: 30 - name: show docker container logs - run: docker compose --file deploy/dev-standalone.yml logs dotcom + run: docker compose --file deploy/local.yml logs if: ${{ failure() }} - - name: docker compose down - if: always() - run: docker compose --file deploy/dev-standalone.yml down diff --git a/deploy/dotcom/dev/1/Dockerfile b/deploy/dotcom/dev/1/Dockerfile index 9cc0c83ec6..2e17bbba1f 100644 --- a/deploy/dotcom/dev/1/Dockerfile +++ b/deploy/dotcom/dev/1/Dockerfile @@ -17,7 +17,5 @@ RUN mix local.rebar --force EXPOSE 4001 CMD mix deps.get \ - && npm install --no-save \ - && mix phx.digest \ && npm --prefix assets install --package-lock-only --ignore-scripts --no-save --audit false --fund false --loglevel verbose \ && elixir --sname dotcom1 --cookie foobarbaz -S mix phx.server diff --git a/deploy/dev-standalone.yml b/deploy/local.yml similarity index 66% rename from deploy/dev-standalone.yml rename to deploy/local.yml index 67ec14820b..12e49f7b98 100644 --- a/deploy/dev-standalone.yml +++ b/deploy/local.yml @@ -1,10 +1,7 @@ services: redis: image: grokzen/redis-cluster - container_name: redis - restart: on-failure - ports: - - 30001-30006:30001-30006 + network_mode: host environment: - INITIAL_PORT=30001 - REDIS_CLUSTER_IP=0.0.0.0 @@ -16,8 +13,10 @@ services: retries: 5 start_period: 5s dotcom: + network_mode: host depends_on: - - redis + redis: + condition: service_healthy build: context: ../ dockerfile: ./deploy/dotcom/dev/1/Dockerfile @@ -32,17 +31,30 @@ services: - PORT=4001 - WEBPACK_PORT=8092 - WARM_CACHES=false + - REDIS_HOST=localhost - REDIS_PORT=30001 expose: - 4001 - ports: - - 4001:4001 - - 8092:8092 healthcheck: test: curl --fail http://localhost:4001/_health || exit 1 - interval: 15s - retries: 10 + interval: 30s + retries: 20 start_period: 180s timeout: 60s volumes: - ../:/app + + a11y-test: + image: mcr.microsoft.com/playwright:v1.42.1-jammy + depends_on: + dotcom: + condition: service_healthy + volumes: + - ../:/app + working_dir: /app + entrypoint: /bin/sh + command: -c "npx playwright test axe" + network_mode: host + environment: + - CI=true + - PLAYWRIGHT_HTML_OPEN=never