diff --git a/.github/workflows/buildpr.yml b/.github/workflows/buildpr.yml index 664eb02..e358b9d 100644 --- a/.github/workflows/buildpr.yml +++ b/.github/workflows/buildpr.yml @@ -13,7 +13,7 @@ permissions: jobs: test-lint: - runs-on: ubuntu-latest + runs-on: blacksmith-4vcpu-ubuntu-2404 steps: - name: Check out Git repository uses: actions/checkout@v1 @@ -23,9 +23,24 @@ jobs: with: node-version: 22.14.0 + - name: Restore node_modules cache + id: node_modules-cache + uses: actions/cache/restore@v4 + with: + path: node_modules + key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }} + - name: Install dependencies + if: steps.node_modules-cache.outputs.cache-hit != 'true' run: npm install --force + - name: Save node_modules cache + if: steps.node_modules-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: node_modules + key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }} + - name: Run lint run: npm run lint @@ -50,8 +65,23 @@ jobs: with: node-version: 22.14.0 + - name: Restore node_modules cache + id: node_modules-cache + uses: actions/cache/restore@v4 + with: + path: node_modules + key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }} + - name: Install dependencies + if: steps.node_modules-cache.outputs.cache-hit != 'true' run: set CI=false && npm install --force + + - name: Save node_modules cache + if: steps.node_modules-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: node_modules + key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }} - name: Build/release Electron app uses: DeadCodeGames/action-electron-builder@908b7cf133f1e9bef6d538ab50ad2f7449538cc7