UI4 - implement popover component (#4382) #128
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - 1.x | |
| - 2.x | |
| - 4-dev | |
| push: | |
| branches: | |
| - main | |
| - 1.x | |
| - 2.x | |
| - 4-dev | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| RAILS_ENV: test | |
| PGHOST: localhost | |
| PGUSER: postgres | |
| PGPORT: 5432 | |
| POSTGRES_HOST: localhost | |
| POSTGRES_USERNAME: postgres | |
| POSTGRES_PORT: 5432 | |
| BUNDLE_PATH_RELATIVE_TO_CWD: true | |
| AVO_LICENSE_KEY: license_123 | |
| COVERAGE: true | |
| jobs: | |
| # ---------------------------------------------------------------------------- | |
| # Feature specs | |
| # ---------------------------------------------------------------------------- | |
| feature: | |
| name: feature (Ruby ${{ matrix.ruby }}, Rails ${{ matrix.rails }}) | |
| strategy: | |
| matrix: | |
| ruby: | |
| - '3.3' | |
| - '3.4' | |
| rails: | |
| - '7.1' | |
| - '8.0' | |
| runs-on: ubuntu-latest | |
| env: | |
| RAILS_VERSION: ${{ matrix.rails }} | |
| BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails }}_ruby_${{ matrix.ruby }}.gemfile | |
| services: | |
| postgres: | |
| image: postgres:10.8 | |
| ports: | |
| - 5432:5432 | |
| options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| bundler: default | |
| ruby-version: ${{ matrix.ruby }} | |
| - name: Prepare database | |
| run: | | |
| bundle exec rake parallel:create parallel:migrate | |
| - name: Get yarn cache directory path | |
| id: test-yarn-cache-dir-path | |
| run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v4 | |
| id: test-yarn-cache | |
| with: | |
| path: ${{ steps.test-yarn-cache-dir-path.outputs.dir }} | |
| key: ${{ runner.os }}-test-yarn-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-test-yarn-${{ hashFiles('**/yarn.lock') }} | |
| - name: Yarn install the dummy app | |
| run: | | |
| cd spec/dummy | |
| yarn | |
| - name: Yarn install | |
| run: yarn | |
| - name: Build assets | |
| env: | |
| RAILS_ENV: production | |
| NODE_ENV: production | |
| run: | | |
| yarn build | |
| yarn build:custom-js | |
| - name: Run tests | |
| id: run_tests | |
| run: | | |
| bundle exec parallel_rspec spec/features | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage_features_${{ matrix.rails }}_ruby_${{ matrix.ruby }} | |
| path: coverage/.resultset.json | |
| - uses: actions/upload-artifact@v4 | |
| if: always() && steps.run_tests.outcome == 'failure' | |
| with: | |
| name: rspec_failed_screenshots_rails_${{ matrix.rails }}_ruby_${{ matrix.ruby }} | |
| path: | | |
| ./spec/dummy/tmp/screenshots | |
| ./spec/examples.txt | |
| # ---------------------------------------------------------------------------- | |
| # System specs (sharded) | |
| # ---------------------------------------------------------------------------- | |
| system: | |
| name: system (Ruby ${{ matrix.ruby }}, Rails ${{ matrix.rails }}, ${{ matrix.spec_group.display }}) | |
| strategy: | |
| matrix: | |
| ruby: | |
| - '3.3' | |
| - '3.4' | |
| rails: | |
| - '7.1' | |
| - '8.0' | |
| spec_group: | |
| - name: group_1 | |
| display: Group 1 | |
| rspec_paths: spec/system/avo/group_1 | |
| - name: group_2 | |
| display: Group 2 | |
| rspec_paths: spec/system/avo/group_2 | |
| - name: group_3 | |
| display: Group 3 | |
| rspec_paths: spec/system/avo/group_3 | |
| runs-on: ubuntu-latest | |
| env: | |
| RAILS_VERSION: ${{ matrix.rails }} | |
| BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails }}_ruby_${{ matrix.ruby }}.gemfile | |
| services: | |
| postgres: | |
| image: postgres:10.8 | |
| ports: | |
| - 5432:5432 | |
| options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| bundler: default | |
| ruby-version: ${{ matrix.ruby }} | |
| - name: Prepare database | |
| run: | | |
| bundle exec rake parallel:create parallel:migrate | |
| - name: Get yarn cache directory path | |
| id: test-yarn-cache-dir-path | |
| run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v4 | |
| id: test-yarn-cache | |
| with: | |
| path: ${{ steps.test-yarn-cache-dir-path.outputs.dir }} | |
| key: ${{ runner.os }}-test-yarn-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-test-yarn-${{ hashFiles('**/yarn.lock') }} | |
| - name: Yarn install the dummy app | |
| run: | | |
| cd spec/dummy | |
| yarn | |
| - name: Yarn install | |
| run: yarn | |
| - name: Build assets | |
| env: | |
| RAILS_ENV: production | |
| NODE_ENV: production | |
| run: | | |
| yarn build | |
| yarn build:custom-js | |
| - name: Run tests | |
| id: run_tests | |
| run: bundle exec parallel_rspec ${{ matrix.spec_group.rspec_paths }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage_system_${{ matrix.rails }}_ruby_${{ matrix.ruby }}_${{ matrix.spec_group.name }} | |
| path: coverage/.resultset.json | |
| - uses: actions/upload-artifact@v4 | |
| if: always() && steps.run_tests.outcome == 'failure' | |
| with: | |
| name: rspec_failed_screenshots_rails_${{ matrix.rails }}_ruby_${{ matrix.ruby }}_${{ matrix.spec_group.name }} | |
| path: | | |
| ./spec/dummy/tmp/screenshots | |
| ./spec/examples.txt | |
| # ---------------------------------------------------------------------------- | |
| # Components specs | |
| # ---------------------------------------------------------------------------- | |
| components: | |
| name: components (Ruby ${{ matrix.ruby }}, Rails ${{ matrix.rails }}) | |
| strategy: | |
| matrix: | |
| ruby: | |
| - '3.3' | |
| - '3.4' | |
| rails: | |
| - '7.1' | |
| - '8.0' | |
| runs-on: ubuntu-latest | |
| env: | |
| RAILS_VERSION: ${{matrix.rails}} | |
| BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails }}_ruby_${{ matrix.ruby }}.gemfile | |
| services: | |
| postgres: | |
| image: postgres:10.8 | |
| ports: ["5432:5432"] | |
| options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| bundler: default | |
| ruby-version: ${{ matrix.ruby }} | |
| - name: Prepare database | |
| run: | | |
| bin/rails db:create db:migrate | |
| - name: Get yarn cache directory path | |
| id: test-yarn-cache-dir-path | |
| run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v4 | |
| id: test-yarn-cache | |
| with: | |
| path: ${{ steps.test-yarn-cache-dir-path.outputs.dir }} | |
| key: ${{ runner.os }}-test-yarn-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-test-yarn-${{ hashFiles('**/yarn.lock') }} | |
| - name: Yarn install the dummy app | |
| run: | | |
| cd spec/dummy | |
| yarn | |
| - name: Yarn install | |
| run: yarn | |
| - name: Build assets | |
| env: | |
| RAILS_ENV: production | |
| NODE_ENV: production | |
| run: | | |
| yarn build | |
| yarn build:custom-js | |
| - name: Run tests | |
| id: run_tests | |
| run: bundle exec rspec spec/components | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage_components_${{ matrix.rails }}_ruby_${{ matrix.ruby }} | |
| path: coverage/.resultset.json | |
| - uses: actions/upload-artifact@v4 | |
| if: always() && steps.run_tests.outcome == 'failure' | |
| with: | |
| name: rspec_failed_screenshots_rails_${{ matrix.rails }}_ruby_${{ matrix.ruby }} | |
| path: ./spec/dummy/tmp/screenshots | |
| # ---------------------------------------------------------------------------- | |
| # i18n tests | |
| # ---------------------------------------------------------------------------- | |
| i18n: | |
| name: i18n (Ruby ${{ matrix.ruby }}, Rails ${{ matrix.rails }}) | |
| strategy: | |
| matrix: | |
| ruby: ['3.4'] | |
| rails: ['8.0'] | |
| runs-on: ubuntu-latest | |
| env: | |
| RAILS_VERSION: ${{matrix.rails}} | |
| BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails }}_ruby_${{ matrix.ruby }}.gemfile | |
| services: | |
| postgres: | |
| image: postgres:10.8 | |
| ports: ["5432:5432"] | |
| options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| bundler: default | |
| ruby-version: ${{ matrix.ruby }} | |
| - name: Run tests | |
| id: run_tests | |
| run: bundle exec rspec spec/system/avo/i18n_spec.rb | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage_system_${{ matrix.rails }}_ruby_${{ matrix.ruby }} | |
| path: coverage/.resultset.json | |
| - uses: actions/upload-artifact@v4 | |
| if: always() && steps.run_tests.outcome == 'failure' | |
| with: | |
| name: rspec_failed_screenshots_rails_${{ matrix.rails }}_ruby_${{ matrix.ruby }} | |
| path: ./spec/dummy/tmp/screenshots | |
| # ---------------------------------------------------------------------------- | |
| # Accessibility tests | |
| # ---------------------------------------------------------------------------- | |
| accessibility: | |
| name: accessibility (Ruby ${{ matrix.ruby }}, Rails ${{ matrix.rails }}) | |
| strategy: | |
| matrix: | |
| ruby: | |
| - '3.3' | |
| rails: | |
| - '8.0' | |
| runs-on: ubuntu-latest | |
| env: | |
| RAILS_VERSION: ${{matrix.rails}} | |
| BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails }}_ruby_${{ matrix.ruby }}.gemfile | |
| services: | |
| postgres: | |
| image: postgres:10.8 | |
| ports: ["5432:5432"] | |
| options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| bundler: default | |
| ruby-version: ${{ matrix.ruby }} | |
| - name: Prepare database | |
| run: | | |
| bin/rails db:create db:migrate | |
| - name: Get yarn cache directory path | |
| id: test-yarn-cache-dir-path | |
| run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v4 | |
| id: test-yarn-cache | |
| with: | |
| path: ${{ steps.test-yarn-cache-dir-path.outputs.dir }} | |
| key: ${{ runner.os }}-test-yarn-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-test-yarn-${{ hashFiles('**/yarn.lock') }} | |
| - name: Yarn install the dummy app | |
| run: | | |
| cd spec/dummy | |
| yarn | |
| - name: Yarn install | |
| run: yarn | |
| - name: Build assets | |
| env: | |
| RAILS_ENV: production | |
| NODE_ENV: production | |
| run: | | |
| yarn build | |
| - name: Run tests | |
| id: run_tests | |
| run: bundle exec rspec spec/a11y | |
| - uses: actions/upload-artifact@v4 | |
| if: always() && steps.run_tests.outcome == 'failure' | |
| with: | |
| name: rspec_failed_screenshots_a11y_${{ matrix.rails }}_ruby_${{ matrix.ruby }} | |
| path: ./spec/dummy/tmp/screenshots |