diff --git a/.github/workflows/pagy-ci.yml b/.github/workflows/pagy-ci.yml index 4aebe3e14..e20772fa0 100644 --- a/.github/workflows/pagy-ci.yml +++ b/.github/workflows/pagy-ci.yml @@ -21,7 +21,7 @@ jobs: with: concurrent_skipping: 'never' skip_after_successful_duplicate: 'true' - paths: '["gem/lib/**", "gem/locales/en.yml", "Gemfile.lock", ".simplecov", ".rubocop", "Rakefile", "test/**", "tasks/**"]' + paths: '[".github/workflows/pagy-ci.yml", "gem/lib/**", "gem/locales/en.yml", "Gemfile.lock", ".simplecov", ".rubocop", "Rakefile", "test/**", "tasks/**"]' paths_ignore: '["**/*.md"]' do_not_skip: '["workflow_dispatch"]' @@ -62,7 +62,7 @@ jobs: with: concurrent_skipping: 'never' skip_after_successful_duplicate: 'true' - paths: '["gem/**", "e2e/**"]' + paths: '[".github/workflows/pagy-ci.yml", "gem/**", "e2e/**", "pnpm.lock.yaml"]' paths_ignore: '["gem/config/**", "gem/locales/**", "!gem/locales/en.yml", "**/*.md"]' do_not_skip: '["workflow_dispatch"]' @@ -82,15 +82,27 @@ jobs: with: ruby-version: '3.3' bundler-cache: true - - name: Install Cypress and Test Dependencies - working-directory: e2e - run: npm i + - name: Install Pnpm + uses: pnpm/action-setup@v3 + with: + version: 9 # optional because "packageManager" entry is set in package.json + - name: Install Node / Setup Pnpm Cache + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'pnpm' + - name: Setup Cypress Cache + uses: actions/cache@v4 + with: + path: /home/runner/.cache/Cypress + key: ${{ runner.os }}-cypress-cache-${{ hashFiles('pnpm-lock.yaml') }} + - name: Install Dependencies + run: pnpm install --frozen-lockfile - name: Cypress [${{ matrix.app }}] Test - uses: cypress-io/github-action@v6.6.0 + uses: cypress-io/github-action@v6 with: working-directory: e2e - config: baseUrl=http://0.0.0.0:8080,video=false - start: bundle exec pagy ${{ matrix.app }} -p 8080 install: false + config: baseUrl=http://0.0.0.0:8080,video=false + start: ${{ github.workspace }}/gem/bin/pagy ${{ matrix.app }} -p 8080 wait-on: http://0.0.0.0:8080 - spec: cypress/e2e/${{ matrix.app }}/**/*