From d6998bc9cef85d043cc037176fb18fbae5b14a76 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 27 Jun 2024 09:56:08 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20(typescript=5Ftest.yml):=20Add?= =?UTF-8?q?=20step=20to=20get=20Playwright=20version=20and=20cache=20Playw?= =?UTF-8?q?right=20binaries=20based=20on=20the=20version=20for=20better=20?= =?UTF-8?q?dependency=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 dc937bd43..763f4ffce 100644 --- a/.github/workflows/typescript_test.yml +++ b/.github/workflows/typescript_test.yml @@ -14,7 +14,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 @@ -27,8 +27,6 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - with: - ref: ${{ inputs.branch }} - name: Setup Node.js uses: actions/setup-node@v4 @@ -50,14 +48,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