This uses the matrix syntax for all rspec calls. It is easier to
maintain than the previous list of GH Actions workflows.
The execution of the rspec rake task is still in its own job because it
doesn't fit in the same pattern. The JS tests are also executed in that
job.
This demonstrates how you can split the tests across multiple jobs
without repeating the job configuration. This has a lot of potential to
DRY our config.
As is, we're seeing builds almost only on merge commits and not on
others. Also, the build status is not displayed at the bottom of the
PR.
Once we see this fixed and have a better understanding, we can decide
whether or not we remove the `push` event. I guess both we'll be needed.
This shows things like:
```
Top 10 slowest examples (32.34 seconds, 87.1% of total time):
As a site administrator
I want to configure the site content
fills in a setting shows the result on the home page
19.12 seconds ./spec/features/admin/configuration/content_spec.rb:17
States creating and editing states should allow an admin to edit existing states
7.36 seconds ./spec/features/admin/configuration/states_spec.rb:40
Tax Rates while editing can be deleted
1.22 seconds ./spec/features/admin/configuration/tax_rates_spec.rb:58
States creating and editing states should allow an admin to create states for non default countries
1.16 seconds ./spec/features/admin/configuration/states_spec.rb:52
States creating and editing states should show validation errors
1 seconds ./spec/features/admin/configuration/states_spec.rb:68
Zones edit existing zone
0.90067 seconds ./spec/features/admin/configuration/zones_spec.rb:42
```
and
```
Top 8 slowest example groups:
As a site administrator
I want to configure the site content
6.64 seconds average (19.93 seconds / 3 examples) ./spec/features/admin/configuration/content_spec.rb:5
States
2.42 seconds average (9.68 seconds / 4 examples) ./spec/features/admin/configuration/states_spec.rb:5
Tax Rates
0.51138 seconds average (2.56 seconds / 5 examples) ./spec/features/admin/configuration/tax_rates_spec.rb:4
Zones
0.49488 seconds average (1.48 seconds / 3 examples) ./spec/features/admin/configuration/zones_spec.rb:5
Tax Categories
0.32438 seconds average (1.3 seconds / 4 examples) ./spec/features/admin/configuration/tax_categories_spec.rb:5
Taxonomies
0.30578 seconds average (1.22 seconds / 4 examples) ./spec/features/admin/configuration/taxonomies_spec.rb:5
General Settings
0.28868 seconds average (0.57737 seconds / 2 examples) ./spec/features/admin/configuration/general_settings_spec.rb:5
Mail Methods
0.26415 seconds average (0.26415 seconds / 1 example) ./spec/features/admin/configuration/mail_methods_spec.rb:5
Finished in 37.11 seconds (files took 6.27 seconds to load)
26 examples, 0 failures
```
which is essential to speed up our test suite.
The CI build can't find the downloaded file and fails like:
```
2) enterprise fee summaries csv downloads smoke test for generation of report based on permissions when logged in as enterprise user generates file with data for the enterprise
Failure/Error: sleep 0.1 until downloaded?
Timeout::Error:
execution expired
# ./spec/support/downloads_helper.rb:34:in `sleep'
# ./spec/support/downloads_helper.rb:34:in `block in wait_for_download'
# ./spec/support/downloads_helper.rb:33:in `wait_for_download'
# ./spec/support/downloads_helper.rb:11:in `downloaded_filename'
# ./engines/order_management/spec/features/order_management/reports/enterprise_fee_summaries_spec.rb:119:in `block (5 levels) in <top (required)>'
# ./engines/order_management/spec/features/order_management/reports/enterprise_fee_summaries_spec.rb:80:in `block (4 levels) in <top (required)>'
# ./spec/support/downloads_helper.rb:22:in `with_empty_downloads_folder'
# ./engines/order_management/spec/features/order_management/reports/enterprise_fee_summaries_spec.rb:80:in `block (3 levels) in <top (required)>'
```