From 69ca81671914b87eaa938ffc3c33a59aa3996e8e Mon Sep 17 00:00:00 2001 From: taroj1205 Date: Fri, 16 May 2025 12:38:01 +1200 Subject: [PATCH] feat(ci-pipeline): add Playwright testing job to CI workflow - Introduced a new Playwright job that runs after the build job. - Added steps for checking out the repository, setting up Node.js, restoring node_modules from cache, installing dependencies, and installing Playwright browsers. - Included a step to run Playwright tests, enhancing the CI pipeline with automated testing capabilities. --- .github/workflows/ci-pipeline.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index f2ee229..48bf098 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -74,4 +74,25 @@ jobs: node_modules key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} - name: Build project - run: npm run build \ No newline at end of file + run: npm run build + + playwright: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Restore node_modules from cache + uses: actions/cache@v4 + with: + path: | + node_modules + key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} + - name: Install dependencies + run: npm ci + - name: Install Playwright Browsers + run: npx playwright install --with-deps + - name: Run Playwright tests + run: npx playwright test \ No newline at end of file