-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
GEM=pagy | ||
VERSION=6.4.4 | ||
VERSION=7.0.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,9 @@ 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 | ||
|
@@ -45,45 +48,46 @@ jobs: | |
ruby-version: ${{ matrix.ruby-version }} | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
|
||
- name: Run Ruby Tests | ||
- name: Check Tests | ||
run: bundle exec rake test | ||
|
||
- name: Run Rubocop | ||
- name: Check Coverage # fails unless 100% | ||
run: bundle exec rake check_coverage | ||
|
||
- name: Check Rubocop compliance | ||
run: bundle exec rubocop --format github | ||
|
||
- name: Check gem manifest | ||
run: bundle exec rake manifest:check | ||
|
||
|
||
# Temporarily removed: no needed for fixup branch | ||
|
||
# e2e_test: | ||
# needs: should_run | ||
# if: ${{ needs.should_run.outputs.should_skip != 'true' }} | ||
# name: E2E Test | ||
# runs-on: ubuntu-latest | ||
# env: | ||
# # absolute path to run sinatra for cypress in e2e working dir | ||
# BUNDLE_GEMFILE: /home/runner/work/pagy/pagy/.github/gemfiles/default | ||
# | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# | ||
# - name: Set up ruby | ||
# uses: ruby/setup-ruby@v1 | ||
# with: | ||
# ruby-version: '3.2' | ||
# bundler-cache: true | ||
# | ||
# - name: Install Cypress and Test Dependencies | ||
# working-directory: ./e2e | ||
# run: npm i | ||
# | ||
# - name: Run Cypress Tests | ||
# uses: cypress-io/[email protected] | ||
# 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 | ||
e2e_test: | ||
needs: should_run | ||
if: ${{ needs.should_run.outputs.should_skip != 'true' }} | ||
name: E2E 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 | ||
|
||
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/[email protected] | ||
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 |
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.
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.
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.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# frozen_string_literal: true | ||
|
||
SimpleCov.formatter = if ENV['COVERAGE_REPORT'] == 'true' | ||
SimpleCov::Formatter::HTMLFormatter | ||
else | ||
SimpleCov::Formatter::SimpleFormatter | ||
end | ||
|
||
SimpleCov.start do | ||
command_name "Task##{$PROCESS_ID}" # best way to get a different id for the specific task | ||
merge_timeout 60 | ||
enable_coverage :branch | ||
|
||
add_group 'All Extras', %w[lib/pagy/extras] | ||
add_group 'Core', %w[lib/pagy.rb | ||
lib/pagy/backend.rb | ||
lib/pagy/console.rb | ||
lib/pagy/countless.rb | ||
lib/pagy/exceptions.rb | ||
lib/pagy/frontend.rb | ||
lib/pagy/i18n.rb | ||
lib/pagy/url_helpers.rb] | ||
add_group 'Countless', %w[lib/pagy/countless.rb | ||
lib/pagy/extras/countless.rb] | ||
add_group 'Calendar', %w[lib/pagy/extras/calendar.rb | ||
lib/pagy/calendar] | ||
# add_filter "/test/" | ||
add_group 'Tests', %w[test] | ||
end |