From d1d87ca953d502459f5f0194e5c7dd4e19dafa42 Mon Sep 17 00:00:00 2001 From: thiloho <123883702+thiloho@users.noreply.github.com> Date: Tue, 3 Sep 2024 09:56:02 +0200 Subject: [PATCH] Move cleanup into previous step in testing action --- .github/workflows/demo-server-deploy.yml | 9 ++++----- .github/workflows/playwright.yml | 6 +----- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/demo-server-deploy.yml b/.github/workflows/demo-server-deploy.yml index 628f406..08d9fda 100644 --- a/.github/workflows/demo-server-deploy.yml +++ b/.github/workflows/demo-server-deploy.yml @@ -1,11 +1,9 @@ -name: "Deploy app to demo server (demo.archtika.com)" +name: Deploy app to demo server (demo.archtika.com) on: workflow_run: - workflows: ["Playwright tests"] - types: - - completed - + workflows: ['Playwright tests'] + types: [completed] env: SERVER_USER: root SERVER_IP: 128.140.75.240 @@ -13,6 +11,7 @@ env: jobs: deploy: runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index c74a9fc..2697545 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -1,4 +1,4 @@ -name: "Playwright tests" +name: Playwright tests on: push: @@ -26,9 +26,5 @@ jobs: nix shell nixpkgs#netcat -c bash -c 'until nc -z localhost 3000; do sleep 1; done' cd web-app nix develop .#web --command bash -c 'npm install && npm run test' - - - name: Cleanup - if: always() - run: | pkill -f "nix run .#dev-vm" || echo "No dev-vm processes found" pkill -f "nix run .#api" || echo "No api processes found"