Skip to content

Commit

Permalink
merged
Browse files Browse the repository at this point in the history
  • Loading branch information
silkroadnomad committed Dec 6, 2024
2 parents 3bf6fdf + 04e55fd commit e975f65
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 24 deletions.
31 changes: 13 additions & 18 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@ jobs:
uses: actions/checkout@v2
- name: Set up Docker
uses: docker/setup-buildx-action@v2
- name: Modify and Show Docker Compose File
run: |
mkdir -p ./docker/doichain/db
chmod 777 ./docker/doichain/db
# Remove the specific volume line and save changes in place
sed -i '/- \.\/\.doichain\/:\/home\/doichain\/\.doichain\//d' ./docker/doichain/docker-compose-regtest.yml
# Display the modified file contents
echo "📄 Displaying modified docker-compose-regtest.yml contents..."
cat ./docker/doichain/docker-compose-regtest.yml
- name: Set up Docker
uses: hoverkraft-tech/[email protected]
with:
Expand All @@ -30,14 +21,18 @@ jobs:
run: |
echo "🔍 Checking Docker Containers..."
docker compose -f "docker/doichain/docker-compose-regtest.yml" ps
- name: Run Playwright tests
run: |
docker compose -f docker/doichain/docker-compose-regtest.yml --env-file ./docker/doichain/playwright-testing.env up -d
- name: Modify Run Command and Run Playwright tests
run: |
sed -i.bak \
-e 's/^ # command: \["npx", "playwright", "test"\]/ command: \["npx", "playwright", "test"\]/' \
-e 's/^ command: \["echo", "finished building"\]/ # command: \["echo", "finished building"\]/' \
./docker/doichain/docker-compose-regtest.yml
sed -i.bak \
-e '/build:/,+2d' \
./docker/doichain/docker-compose-regtest.yml
cat ./docker/doichain/docker-compose-regtest.yml
set -e docker compose -f "docker/doichain/docker-compose-regtest.yml" up playwright
# sed -i.bak \
# -e 's/^ # command: \["npx", "playwright", "test"\]/ command: \["npx", "playwright", "test"\]/' \
# -e 's/^ command: \["echo", "finished building"\]/ # command: \["echo", "finished building"\]/' \
# ./docker/doichain/docker-compose-regtest.yml
# sed -i.bak \
# -e '/build:/,+2d' \
# ./docker/doichain/docker-compose-regtest.yml
# cat ./docker/doichain/docker-compose-regtest.yml
# set -e # Exit immediately if a command exits with a non-zero status
# docker compose -f "docker/doichain/docker-compose-regtest.yml" up playwright
16 changes: 10 additions & 6 deletions docker/doichain/docker-compose-regtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
- "18443:18443"
- "18445:18445"
volumes:
- ./.doichain/:/home/doichain/.doichain/
- ${DOICHAIN_DATA}:/home/doichain/.doichain/
- ./doichain-regtest.conf:/home/doichain/.doichain/doichain.conf
networks:
- doichain_regtest-network
Expand All @@ -19,6 +19,7 @@ services:
depends_on:
- regtest
volumes:
- ${ELECTRUM_DB_VOLUME}:/home/doichain/.doichain/
- ./db:/var/lib/electrumx
- ./startElectrumDOIRegTest.sh:/startElectrumDOIRegTest.sh
entrypoint: ["/startElectrumDOIRegTest.sh"]
Expand All @@ -34,23 +35,26 @@ services:

playwright:
build:
context: ../../
dockerfile: ./docker/doichain/playwright/Dockerfile
context: ${PLAYWRIGHT_BUILD_CONTEXT}
dockerfile: ${PLAYWRIGHT_DOCKERFILE}
container_name: playwright
hostname: playwright
ports:
- "9323:9323"
image: "doichain/playwright:latest"
# command: ["npx", "playwright", "test"]
command: ["echo", "finished building"]
command: ${PLAYWRIGHT_COMMAND}
stdin_open: true
tty: true
depends_on:
- regtest
- electrumx
networks:
- doichain_regtest-network

networks:
doichain_regtest-network:
driver: bridge
####end of file
volumes:
doichain:
db:
regtest:
5 changes: 5 additions & 0 deletions docker/doichain/playwright-testing.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
DOICHAIN_DATA=doichain
PLAYWRIGHT_COMMAND="npx playwright test"
ELECTRUM_DB_VOLUME=db
PLAYWRIGHT_BUILD_CONTEXT=none
PLAYWRIGHT_DOCKERFILE=none

0 comments on commit e975f65

Please sign in to comment.