fixing the sed command to remove volume db from electrumx #79
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Playwright Tests | |
on: | |
push: | |
branches: [ main, master ] | |
pull_request: | |
branches: [ main, master ] | |
jobs: | |
test: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Docker Compose | |
uses: actions/checkout@v2 | |
- name: Set up Docker | |
uses: docker/setup-buildx-action@v2 | |
- name: Modify and Show Docker Compose File | |
run: | | |
# Remove the specific volume line and save changes in place | |
sed -i '/- \.\/\.doichain\/:\/home\/doichain\/\.doichain\//d' ./docker/doichain/docker-compose-regtest.yml | |
sed -i '/- \.\/db\/:\/var\/lib\/electrumx/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/compose-action@v2.0.2 | |
with: | |
compose-file: "docker/doichain/docker-compose-regtest.yml" | |
# - name: Check Docker Containers | |
# run: | | |
# echo "🔍 Checking Docker Containers..." | |
# docker-compose -f "docker/doichain/docker-compose-regtest.yml" ps | |
# - name: Get Regtest Container Logs | |
# run: | | |
# echo "📜 Fetching logs for regtest container..." | |
# docker-compose -f "docker/doichain/docker-compose-regtest.yml" logs regtest | |
- 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 | |
docker compose -f "docker/doichain/docker-compose-regtest.yml" up playwright | |
# - uses: actions/setup-node@v4 | |
# with: | |
# node-version: '20' | |
# - name: Install dependencies | |
# run: yarn install --frozen-lockfile | |
# - name: Start the development server | |
# run: npm run dev & npx wait-on http://localhost:5173 | |
# - name: Install Playwright Browsers | |
# run: npx playwright install --with-deps | |
# - name: Run Playwright tests | |
# run: docker/healthcheck.sh regtest 120 && npx playwright test | |
# - uses: actions/upload-artifact@v4 | |
# if: ${{ !cancelled() }} | |
# with: | |
# name: playwright-report | |
# path: playwright-report/ | |
# retention-days: 30 |