diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml deleted file mode 100644 index 05592d757..000000000 --- a/.github/actions/setup-node/action.yml +++ /dev/null @@ -1,31 +0,0 @@ -# This is the composite action: -# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action - -name: Setup Node, pnpm and install dependencies -description: Setup pnpm and Node.js with caching - -inputs: - run-install: - description: 'Whether to run `pnpm install`' - required: false - default: 'true' - -runs: - using: composite - steps: - - name: Setup pnpm - uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 - with: - run_install: false - - - name: Setup Node - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 - with: - node-version-file: .nvmrc - cache: pnpm - cache-dependency-path: pnpm-lock.yaml - - - name: Install dependencies - if: ${{ inputs.run-install == 'true' }} - run: pnpm install --frozen-lockfile - shell: bash diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 045c1f713..769488e36 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,17 +27,17 @@ jobs: include: - os: macos-latest platform: macOS - package-cmd: pnpm package:macos --publish=never -c.mac.identity=null + package-cmd: vp run package:macos -- --publish=never -c.mac.identity=null cleanup-path: dist/mac-universal artifact-name: Gitify-dist-mac - os: windows-latest platform: Windows - package-cmd: pnpm package:win --publish=never + package-cmd: vp run package:win -- --publish=never cleanup-path: dist/win-unpacked artifact-name: Gitify-dist-win - os: ubuntu-latest platform: Linux - package-cmd: pnpm package:linux --publish=never + package-cmd: vp run package:linux -- --publish=never cleanup-path: dist/linux-unpacked artifact-name: Gitify-dist-linux runs-on: ${{ matrix.os }} @@ -48,11 +48,13 @@ jobs: with: persist-credentials: false - - name: Setup Node.js - uses: ./.github/actions/setup-node + - name: Setup Vite+ + uses: voidzero-dev/setup-vp@1b32467adbe183473499fd9d5d372c3ed9641754 # v1.18.0 + with: + cache: true - name: Build application - run: pnpm build + run: vp run build - name: Package for ${{ matrix.platform }} run: ${{ matrix.package-cmd }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ea7d81363..ff5b37d0b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,11 +18,13 @@ jobs: with: persist-credentials: false - - name: Setup Node.js - uses: ./.github/actions/setup-node + - name: Setup Vite+ + uses: voidzero-dev/setup-vp@1b32467adbe183473499fd9d5d372c3ed9641754 # v1.18.0 + with: + cache: true - name: Run lint and format checks - run: pnpm check + run: vp run check lint-actions: name: Lint GitHub Actions [actionlint] diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 282f0c059..0ac4e2e94 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -45,17 +45,17 @@ jobs: include: - os: macos-latest platform: macOS - package-cmd: pnpm package:macos --publish onTagOrDraft + package-cmd: vp run package:macos -- --publish onTagOrDraft artifact-name: Gitify-release-mac use-apple-notarization: true - os: windows-latest platform: Windows - package-cmd: pnpm package:win --publish onTagOrDraft + package-cmd: vp run package:win -- --publish onTagOrDraft artifact-name: Gitify-release-win use-apple-notarization: false - os: ubuntu-latest platform: Linux - package-cmd: pnpm package:linux --publish onTagOrDraft + package-cmd: vp run package:linux -- --publish onTagOrDraft artifact-name: Gitify-release-linux use-apple-notarization: false runs-on: ${{ matrix.os }} @@ -66,11 +66,13 @@ jobs: with: persist-credentials: false - - name: Setup Node.js - uses: ./.github/actions/setup-node + - name: Setup Vite+ + uses: voidzero-dev/setup-vp@1b32467adbe183473499fd9d5d372c3ed9641754 # v1.18.0 + with: + cache: true - name: Build application - run: pnpm build + run: vp run build env: OAUTH_CLIENT_ID: ${{ secrets.OAUTH_CLIENT_ID }} diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index e1f372357..cdde0216c 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -23,14 +23,14 @@ jobs: persist-credentials: false sparse-checkout: | renovate.json + package.json + pnpm-lock.yaml .github - - uses: ./.github/actions/setup-node + - uses: voidzero-dev/setup-vp@1b32467adbe183473499fd9d5d372c3ed9641754 # v1.18.0 with: + cache: true run-install: 'false' - - name: Install Renovate - run: pnpm install --global renovate - - name: Validate Renovate config - run: renovate-config-validator + run: vp dlx --package renovate renovate-config-validator diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a5bd74559..93787a3e7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,14 +21,16 @@ jobs: with: persist-credentials: false - - name: Setup Node.js - uses: ./.github/actions/setup-node + - name: Setup Vite+ + uses: voidzero-dev/setup-vp@1b32467adbe183473499fd9d5d372c3ed9641754 # v1.18.0 + with: + cache: true - name: Check TypeScript - run: pnpm tsc --noEmit + run: vp exec tsc --noEmit - name: Run tests with coverage - run: pnpm test + run: vp run test - name: Archive code coverage results uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 @@ -59,15 +61,17 @@ jobs: with: persist-credentials: false - - name: Setup Node.js - uses: ./.github/actions/setup-node + - name: Setup Vite+ + uses: voidzero-dev/setup-vp@1b32467adbe183473499fd9d5d372c3ed9641754 # v1.18.0 + with: + cache: true - name: Run visual regression tests # The job already runs in the pinned image, so the script runs vitest # directly instead of starting another container. env: GITIFY_VISUAL_IN_CONTAINER: '1' - run: pnpm test:visual + run: vp run test:visual # Vitest writes the actual and diff images here; the reference stays in # __screenshots__. Download this to see what changed. @@ -95,8 +99,10 @@ jobs: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis persist-credentials: false - - name: Setup Node.js - uses: ./.github/actions/setup-node + - name: Setup Vite+ + uses: voidzero-dev/setup-vp@1b32467adbe183473499fd9d5d372c3ed9641754 # v1.18.0 + with: + cache: true - name: Download a single artifact uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1