From 470b8c2a95a39e3cd8c4437ef8eb6b4fabc24d55 Mon Sep 17 00:00:00 2001 From: AGiljanovic Date: Thu, 23 May 2024 16:24:07 +0200 Subject: [PATCH 1/2] UPD: Change e2e workflow only on PR --- .github/workflows/run-tests.yml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 2427e31..7183671 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,11 +1,11 @@ -name: Test and E2E tests -run-name: Run tests and E2E tests +name: Test and E2E tests on PR +run-name: Run tests and E2E tests on PR on: - push: pull_request: branches: - main + jobs: run-tests: runs-on: ubuntu-latest @@ -21,18 +21,13 @@ jobs: run-e2e-tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 #chekcout te repository + - uses: actions/checkout@v4 - name: Use Node.js - uses: actions/setup-node@v3 #setup node version 20 + uses: actions/setup-node@v3 with: node-version: '20' - - - name: Install dependencies #install dependencies - run: yarn install - + - run: yarn install - name: Run E2E tests env: - PLAYWRIGHT_URL: http://localhost:3000 # set the URL of the app to test with playwright - CI: # unset CI because it is set by default in Github actions - run: | - yarn test:e2e + PLAYWRIGHT_URL: http://localhost:3000 + run: yarn test:e2e From d2d573a6a5b29528842055359b2c5781e2e5263d Mon Sep 17 00:00:00 2001 From: AGiljanovic Date: Thu, 23 May 2024 17:16:37 +0200 Subject: [PATCH 2/2] UPD: Added missing lines of deleted code --- .github/workflows/run-tests.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 7183671..2d19cc1 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,11 +1,9 @@ name: Test and E2E tests on PR run-name: Run tests and E2E tests on PR - on: pull_request: branches: - main - jobs: run-tests: runs-on: ubuntu-latest @@ -26,8 +24,13 @@ jobs: uses: actions/setup-node@v3 with: node-version: '20' - - run: yarn install + + - name: Install dependencies + run: yarn install + - name: Run E2E tests env: PLAYWRIGHT_URL: http://localhost:3000 - run: yarn test:e2e + CI: + run: | + yarn test:e2e