Skip to content

Commit

Permalink
Use pnpm and cache in pagy CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Apr 21, 2024
1 parent ef0dfcb commit c498f5d
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions .github/workflows/pagy-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]'

Expand Down Expand Up @@ -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"]'

Expand All @@ -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 }}/**/*

0 comments on commit c498f5d

Please sign in to comment.