From 51b34cd721defd45d61dfd2d69d78fa9c3d6b6e6 Mon Sep 17 00:00:00 2001 From: Polina Date: Tue, 9 Jan 2024 14:51:21 +0200 Subject: [PATCH] add running ui tests in pipeline.yml --- .github/workflows/pipeline.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 4c9b05a..0806d03 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -1,5 +1,5 @@ -name: Build Project +name: Build, Tests and Deploy Titanic Story - Project on: push: @@ -10,7 +10,6 @@ on: jobs: build: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v3 - name: Use Node.js 18.x @@ -26,8 +25,25 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - name: Deploy to production + - name: Deploy application to production uses: johnbeynon/render-deploy-action@v0.0.8 with: service-id: ${{ secrets.MY_RENDER_SERVICE_ID }} api-key: ${{ secrets.MY_RENDER_API_KEY }} + + runs-ui-tests: + needs: deploy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Use Node.js 18.x + uses: actions/setup-node@v3 + with: + node-version: 18.x + cache: 'npm' + - name: Install dependencies for application + run: npm install + - name: Install Playwright + run: npx playwright install + - name: Run UI tests + run: npm run test:ui \ No newline at end of file