From aade90ace454fbea92a6ba9ed3ba0b39e8c8f085 Mon Sep 17 00:00:00 2001 From: Marcus Felling <6855361+MarcusFelling@users.noreply.github.com> Date: Fri, 16 Sep 2022 09:50:05 -0500 Subject: [PATCH] move test job into it's own workflow --- .github/workflows/podcast-test.yml | 51 ++++++++++++++++++++++++++++++ .github/workflows/podcast-web.yml | 39 +---------------------- 2 files changed, 52 insertions(+), 38 deletions(-) create mode 100644 .github/workflows/podcast-test.yml diff --git a/.github/workflows/podcast-test.yml b/.github/workflows/podcast-test.yml new file mode 100644 index 0000000..3ad0e50 --- /dev/null +++ b/.github/workflows/podcast-test.yml @@ -0,0 +1,51 @@ +name: Podcast Test + +on: + push: + branches: [main] + paths: + - "src/Web/E2E/**" + - ".github/workflows/podcast-test.yml" + pull_request: + branches: [main] + paths: + - "src/Web/E2E**" + - ".github/workflows/podcast-test.yml" + workflow_dispatch: + +jobs: + test: + timeout-minutes: 60 + runs-on: ubuntu-latest + container: mcr.microsoft.com/playwright:v1.25.2-focal + env: + BASEURL: https://${{secrets.WEBAPP_NAME}}.azurewebsites.net + defaults: + run: + working-directory: src/Web/E2E + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '14.x' + + - name: Install dependencies + run: npm ci + + - name: Run Playwright tests + run: | + HOME=/root npx playwright test + + - name: Create test summary + uses: test-summary/action@dist + if: always() + with: + paths: src/Web/E2E/test-results/junit.xml + + - name: Upload HTML report + uses: actions/upload-artifact@v2 + if: always() + with: + name: playwright-report + path: src/Web/E2E/playwright-report/ + retention-days: 30 \ No newline at end of file diff --git a/.github/workflows/podcast-web.yml b/.github/workflows/podcast-web.yml index ae5f4cf..28d2402 100644 --- a/.github/workflows/podcast-web.yml +++ b/.github/workflows/podcast-web.yml @@ -119,41 +119,4 @@ jobs: uses: Azure/webapps-deploy@v2 with: app-name: ${{ secrets.WEBAPP_NAME }} - package: web - - test: - needs: deploy - timeout-minutes: 60 - runs-on: ubuntu-latest - container: mcr.microsoft.com/playwright:v1.25.2-focal - env: - BASEURL: https://${{secrets.WEBAPP_NAME}}.azurewebsites.net - defaults: - run: - working-directory: src/Web/E2E - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: '14.x' - - - name: Install dependencies - run: npm ci - - - name: Run Playwright tests - run: | - HOME=/root npx playwright test - - - name: Create test summary - uses: test-summary/action@dist - if: always() - with: - paths: src/Web/E2E/test-results/junit.xml - - - name: Upload HTML report - uses: actions/upload-artifact@v2 - if: always() - with: - name: playwright-report - path: src/Web/E2E/playwright-report/ - retention-days: 30 \ No newline at end of file + package: web \ No newline at end of file