diff --git a/.github/workflows/guideline-blocks-continuous-integration.yml b/.github/workflows/guideline-blocks-continuous-integration.yml index 6e2ab9e12..d29dd24e7 100644 --- a/.github/workflows/guideline-blocks-continuous-integration.yml +++ b/.github/workflows/guideline-blocks-continuous-integration.yml @@ -48,6 +48,47 @@ jobs: - name: Lint code run: pnpm --stream --filter {packages/guideline-blocks-settings} lint + unit-tests: + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - name: Checkout current commit + uses: actions/checkout@v4 + + - name: Use Node.js ${{ env.NODE_VERSION }} + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + + - name: Use pnpm + uses: pnpm/action-setup@v2.4.0 + with: + version: latest + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - name: Setup pnpm cache + uses: actions/cache@v3 + with: + path: | + ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + ~/.cache/Cypress + key: pnpm-with-cypress-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} + restore-keys: pnpm-with-cypress-${{ runner.os }}- + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build local dependencies + run: pnpm build:app-bridge && pnpm build:sidebar-settings + + - name: Unit Tests + run: pnpm --stream --filter {packages/guideline-blocks-settings} test + component-tests: runs-on: ubuntu-latest timeout-minutes: 10