From e517d18d48306fb183e5b48474fc4bd3c7c72a7d Mon Sep 17 00:00:00 2001 From: giancarlo Date: Thu, 11 Apr 2024 16:21:08 +0800 Subject: [PATCH] Update GitHub Actions workflow Enhancements have been made to the GitHub Actions workflow. The fetch depth has been updated and a cache has been added. Node.js dependencies are now setup with 'pnpm' cache and the 'test' timeout minutes have been reduced to 15. Also, Playwright Browsers are now installed before running Playwright tests. --- .github/workflows/workflow.yml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index bb9754e47..ed1dfaa42 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -9,9 +9,21 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 2 + - uses: actions/setup-node@v4 with: node-version: lts/* + cache: 'pnpm' + + - uses: actions/cache@v4 + with: + path: .turbo + key: ${{ runner.os }}-turbo-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-turbo- + - name: Install dependencies run: npm install -g pnpm && pnpm install - name: Typecheck @@ -20,15 +32,29 @@ jobs: run: pnpm run lint test: - timeout-minutes: 60 + timeout-minutes: 15 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - uses: actions/cache@v4 + with: + path: .turbo + key: ${{ runner.os }}-turbo-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-turbo- + - uses: actions/setup-node@v4 with: node-version: lts/* + cache: 'pnpm' + - name: Install dependencies run: npm install -g pnpm && pnpm install + - name: Install Playwright Browsers + run: pnpm exec ./apps/e2e/node_modules/.bin/playwright install --with-deps - name: Run Playwright tests run: pnpm run test - uses: actions/upload-artifact@v4