From c3d84dd50da86b4d3622d15090a69eab9e115fc5 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 27 Jun 2024 09:53:39 -0300 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=94=A7=20(typescript=5Ftest.yml):=20u?= =?UTF-8?q?pdate=20workflow=20trigger=20from=20workflow=5Fdispatch=20to=20?= =?UTF-8?q?pull=5Frequest=20and=20merge=5Fgroup=20to=20improve=20workflow?= =?UTF-8?q?=20automation=20and=20efficiency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/typescript_test.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/typescript_test.yml b/.github/workflows/typescript_test.yml index bd06b5dab..af3cb10c4 100644 --- a/.github/workflows/typescript_test.yml +++ b/.github/workflows/typescript_test.yml @@ -1,12 +1,8 @@ name: Run Frontend Tests on: - workflow_dispatch: - inputs: - branch: - description: "Branch to run tests on" - required: true - type: string + pull_request: + merge_group: env: From f2fa0be2d055fc093aee81826204d328e8ce9389 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 27 Jun 2024 09:54:00 -0300 Subject: [PATCH 2/3] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20(typescript=5Ftest.yml?= =?UTF-8?q?):=20upgrade=20Poetry=20version=20from=201.8.2=20to=201.8.3=20f?= =?UTF-8?q?or=20testing=20purposes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/typescript_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/typescript_test.yml b/.github/workflows/typescript_test.yml index af3cb10c4..41c60e7c5 100644 --- a/.github/workflows/typescript_test.yml +++ b/.github/workflows/typescript_test.yml @@ -6,7 +6,7 @@ on: env: - POETRY_VERSION: "1.8.2" + POETRY_VERSION: "1.8.3" NODE_VERSION: "21" PYTHON_VERSION: "3.12" # Define the directory where Playwright browsers will be installed. From 7b12a4b3bef51a6ae2c336a2f7d76c63c1c33930 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 27 Jun 2024 09:56:08 -0300 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=94=A7=20(typescript=5Ftest.yml):=20A?= =?UTF-8?q?dd=20step=20to=20get=20Playwright=20version=20and=20cache=20Pla?= =?UTF-8?q?ywright=20binaries=20based=20on=20the=20version=20for=20better?= =?UTF-8?q?=20dependency=20management?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🔧 (typescript_test.yml): Update job name to "Run Playwright Tests" for clarity and consistency 🔧 (typescript_test.yml): Remove unnecessary 'ref' input from 'actions/checkout' step --- .github/workflows/typescript_test.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/typescript_test.yml b/.github/workflows/typescript_test.yml index 41c60e7c5..cb21c3f4b 100644 --- a/.github/workflows/typescript_test.yml +++ b/.github/workflows/typescript_test.yml @@ -15,7 +15,7 @@ env: jobs: setup-and-test: - name: Run Frontend Tests on branch ${{ inputs.branch }} + name: Run Playwright Tests runs-on: ubuntu-latest strategy: fail-fast: false @@ -25,8 +25,6 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - with: - ref: ${{ inputs.branch }} - name: Setup Node.js uses: actions/setup-node@v4 @@ -48,14 +46,15 @@ jobs: cd src/frontend npm ci if: ${{ steps.setup-node.outputs.cache-hit != 'true' }} - - - name: Cache playwright binaries - uses: actions/cache@v4 + - name: Get Playwright version + run: echo "PLAYWRIGHT_VERSION=$(jq '.devDependencies["@playwright/test"]' src/frontend/package.json -r)" >> $GITHUB_ENV + - name: Cache Playwright binaries id: playwright-cache + uses: actions/cache@v4 with: - path: | - ~/.cache/ms-playwright - key: ${{ runner.os }}-playwright-${{ hashFiles('src/frontend/package-lock.json') }} + path: ~/.cache/ms-playwright + key: playwright-browsers-${{ runner.os }}-${{ env.PLAYWRIGHT_VERSION }} + - name: Install Frontend dependencies run: | cd src/frontend