diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 1db1a39..fdb6315 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -3,6 +3,7 @@ name: CI on: push: branches: + - main - master pull_request: {} @@ -25,7 +26,20 @@ jobs: uses: actions/setup-node@v4 with: node-version: 22 - cache: pnpm + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v4 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + - name: Install Dependencies run: pnpm install --frozen-lockfile - name: Lint @@ -45,7 +59,20 @@ jobs: uses: actions/setup-node@v4 with: node-version: 22 - cache: pnpm + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v4 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + - name: Install Dependencies run: pnpm install --frozen-lockfile - name: Run Tests