Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Apr 25, 2024
2 parents d6d17cf + 3939301 commit 972ae16
Show file tree
Hide file tree
Showing 84 changed files with 4,742 additions and 9,052 deletions.
23 changes: 18 additions & 5 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,24 @@

Pull Requests are welcome!

Before spending time creating a (potentially complex) Pull Request, you can [Confirm Feature Request](https://github.com/ddnexus/pagy/discussions/categories/feature-requests) to ensure that your proposed changes are going to be useful for most users.
Here are a few useul information for you:

If you Create A Pull Request, please ensure that the "All checks have passed" indicator gets green light on the Pull Request page (if it's not enabled, a maintainer will enable it for you).

For adding translations of locale dictionary files please follow
the [locales readme instructions here.](https://github.com/ddnexus/pagy/blob/master/gem/locales/README.md).
1. If you are planning for a complex PR, we suggest that you check before hand whether your
proposed changes are going to be accepted by posting your ideas in
the [Feature Requests](https://github.com/ddnexus/pagy/discussions/categories/feature-requests) discussion area
2. For adding translations of locale dictionary files please follow
the [locales readme instructions here](https://github.com/ddnexus/pagy/blob/master/gem/locales/README.md).
3. **Development**
- Please create your own branch out of `master` and use it for you development and PR
- Ensure you are basing your PR on the `master` branch and keep rebasing it on `master` when it changes
- You can have a decent development environment already setup by just using one of the apps in
the [Pagy Playground](https://ddnexus.github.io/pagy/playground) and/or
with the [Pagy::Console](https://ddnexus.github.io/pagy/docs/api/console/) directly from the repo
4. **Testing**
- If your PR **does not add any new feature** (e.g. a fix), please, just ensure that the "All checks have passed" indicator
gets green light on the PR page (if it's not enabled, a maintainer will enable it for you)
- If your PR **adds new features**, it needs [Ruby testing](https://github.com/ddnexus/pagy/tree/master/test) and/or
[E2E testing](https://github.com/ddnexus/pagy/tree/master/e2e) or the coverage will fail. Ask for support if you need
assistance.

Thank you!
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ body:
attributes:
label: 👀 Before submitting...
options:
- label: I upgraded to pagy version 8.2.2
- label: I upgraded to pagy version 8.3.0
required: true
- label: I searched through the [Documentation](https://ddnexus.github.io/pagy/)
required: true
Expand Down
31 changes: 0 additions & 31 deletions .github/gemfiles/default

This file was deleted.

9 changes: 7 additions & 2 deletions .github/latest_release_body.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ If you wish to keep your favorites alive, please, [vote here](https://github.com
- Better frontend helpers
- See the [CHANGELOG](https://ddnexus.github.io/pagy/changelog) for possible breaking changes

### Changes in 8.2.2
### Changes in 8.3.0

<!-- changes start -->
- Add nav translation for ko (closes #592) (#690)
- Discontinue foundation materialize, semantic and uikit CSS extras
- Improve playground:
- Add install option (automated in pagy development)
- Fix HTML validation for all apps
- Remove unused styles from the demo app
- Hardcode version in pagy.gemspec
<!-- changes end -->

[CHANGELOG](https://ddnexus.github.io/pagy/changelog)
67 changes: 36 additions & 31 deletions .github/workflows/pagy-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
branches: ['**']

jobs:

######################### Ruby #########################
ruby_check:
name: Ruby Check
continue-on-error: true
Expand All @@ -21,9 +21,9 @@ jobs:
with:
concurrent_skipping: 'never'
skip_after_successful_duplicate: 'true'
paths: '["gem/lib/**", "gem/locales/en.yml", ".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", "schedule"]'
do_not_skip: '["workflow_dispatch"]'

ruby_test:
needs: ruby_check
Expand All @@ -34,29 +34,22 @@ jobs:
matrix:
ruby-version: ['3.1', '3.2', '3.3']
fail-fast: false
env:
# Gemfile versions not locked, so tests may fail, forcing us to update the code
BUNDLE_GEMFILE: .github/gemfiles/default

steps:
- uses: actions/checkout@v4

- name: Set up ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: Check Rubocop compliance
run: bundle exec rubocop --format github

- name: Check Tests
run: bundle exec rake test

- name: Check Coverage # fails unless 100%
run: bundle exec rake check_coverage


######################### E2E #########################
e2e_check:
name: E2E Check
continue-on-error: true
Expand All @@ -69,37 +62,49 @@ jobs:
with:
concurrent_skipping: 'never'
skip_after_successful_duplicate: 'true'
paths: '["gem/lib/**", "gem/locales/en.yml", "gem/javascripts/**", "e2e/**"]'
paths_ignore: '["**/*.md"]'
do_not_skip: '["workflow_dispatch", "schedule"]'
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"]'

e2e_test:
needs: e2e_check
if: ${{ needs.e2e_check.outputs.should_skip != 'true' }}
name: E2E Test
name: E2E [${{ matrix.app }}] Test
runs-on: ubuntu-latest
env:
# absolute path required to run sinatra for cypress in e2e working dir
BUNDLE_GEMFILE: /home/runner/work/pagy/pagy/.github/gemfiles/default

strategy:
matrix:
app: ['demo', 'repro', 'rails', 'calendar']
fail-fast: false
steps:
- uses: actions/checkout@v4

- name: Set up ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true

- name: Install Cypress and Test Dependencies
working-directory: ./e2e
run: npm i

- name: Run Cypress Tests
uses: cypress-io/github-action@v6.6.0
- 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
with:
config: baseUrl=http://0.0.0.0:4567,video=false
start: bundle exec rackup -D -o 0.0.0.0 -p 4567 pagy_app.ru
install: false
wait-on: http://0.0.0.0:4567
working-directory: e2e
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
wait-on-timeout: 120
spec: cypress/e2e/${{ matrix.app }}.cy.ts
4 changes: 0 additions & 4 deletions .github/workflows/retype-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,10 @@ on:
jobs:
publish:
name: Publish to docs-site branch

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: retypeapp/action-build@v3

- uses: retypeapp/action-github-pages@v3
with:
branch: docs-site
Expand Down
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# that are quite a few and very useful not only for the author
/.idea/*
!/.idea/runConfigurations
/.retype/
/retype.manifest
/.bundle/
/.retype/
/coverage/
node_modules/
/gem/pkg/
/tmp/
pnpm
node_modules/
pnpm/
tmp/
/retype.manifest
.pnpm-debug.log
4 changes: 2 additions & 2 deletions .idea/runConfigurations/Calendar.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/runConfigurations/Demo.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/runConfigurations/Rails.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/runConfigurations/Repro.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .idea/runConfigurations/calendar.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/runConfigurations/e2e_test.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions .idea/runConfigurations/pagy_app.xml

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .idea/runConfigurations/repro.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 972ae16

Please sign in to comment.