Skip to content

Docs: improve instructions for adding locales #1189

Docs: improve instructions for adding locales

Docs: improve instructions for adding locales #1189

Workflow file for this run

name: Pagy CI
on:
push:
branches:
- '**'
pull_request:
branches: ['**']
jobs:
should_run:
name: Run or skip?
continue-on-error: true
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
# All of these options are optional, so you can remove them if you are happy with the defaults
concurrent_skipping: 'never'
skip_after_successful_duplicate: 'true'
paths_ignore: '["**/*.md", "**/docs/**", "lib/config/pagy.rb", "LICENSE.txt"]'
do_not_skip: '["workflow_dispatch", "schedule"]'
ruby_test:
needs: should_run
if: ${{ needs.should_run.outputs.should_skip != 'true' }}
name: Ruby ${{ matrix.ruby-version }} Test
runs-on: ubuntu-latest
strategy:
matrix:
include:
- ruby-version: '3.0'
env:
BUNDLE_GEMFILE: .github/gemfiles/default
- ruby-version: '3.1'
env:
BUNDLE_GEMFILE: .github/gemfiles/default
# RUBYOPT: '--disable-error_highlight'
- ruby-version: '3.2'
env:
BUNDLE_GEMFILE: .github/gemfiles/default
CODECOV: true
CHECK_MANIFEST: true
# RUBYOPT: '--disable-error_highlight'
fail-fast: false
env: ${{ matrix.env }}
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: Run Ruby Tests
run: bundle exec rake test
- name: Run Rubocop
run: bundle exec rubocop --format github
- name: Run Codecov
if: ${{ env.CODECOV == 'true' }}
uses: codecov/codecov-action@v3.1.4
with:
fail_ci_if_error: true
- name: Check gem manifest
if: ${{ env.CHECK_MANIFEST == 'true' }}
run: bundle exec rake manifest:check
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
# You may pin to the exact commit or the version.
# uses: cypress-io/github-action@c5724eda82337bcff977ce14509f47052c12e04c
uses: cypress-io/github-action@v6.5.0
with:
# Sends test results to Cypress Dashboard
record: # optional
# Set configuration values. Separate multiple values with a comma. The values set here override any values set in your configuration file.
config: baseUrl=http://0.0.0.0:4567,video=false
# Path to the cypress config file where configuration values are set.
config-file: # optional, default is
# Sets Cypress environment variables
env: # optional
# Name of the browser to use
browser: # optional
# Command that overrides cypress run
command: # optional
# Command for starting local server in the background
start: bundle exec rackup -D -o 0.0.0.0 -p 4567 pagy_app.ru
# A different start command on Windows
start-windows: # optional
# Command to run in build step before starting tests
build: # optional
# Whether or not to run install
install: false
# Custom install command to use
install-command: # optional
# Whether or not to run tests
runTests: # optional
# Local server URL to wait for
wait-on: http://0.0.0.0:4567
# Amount of time to wait for wait-on url to be available
wait-on-timeout: # optional
# Whether or not to load balance tests using multiple containers
parallel: # optional
# Group setting for tests
group: # optional
# Tag setting for tests
tag: # optional
# Working directory containing Cypress folder
working-directory: e2e
# Whether or not to use headed mode
headed: # optional
# Provide a specific specs to run
spec: # optional
# Path of project to run
project: # optional
# You can prefix the default test command using the command-prefix option.
command-prefix: # optional
# ID associates multiple CI machines to one test run
ci-build-id: # optional
# Custom cache key
cache-key: # optional
# Whether or not to silence any Cypress specific output from stdout
quiet: # optional
# Lets the action know that Cypress is running component tests and not e2e tests
component: # optional