Skip to content

Commit

Permalink
even simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
thecristen committed Aug 7, 2024
1 parent 4e6ffcb commit b931f09
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 25 deletions.
15 changes: 2 additions & 13 deletions .github/workflows/tests-axe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,13 @@ 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:
name: axe-report-${{ github.sha }}
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
2 changes: 0 additions & 2 deletions deploy/dotcom/dev/1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
32 changes: 22 additions & 10 deletions deploy/dev-standalone.yml → deploy/local.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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

0 comments on commit b931f09

Please sign in to comment.