Feature #42688
openRun system tests on GitHub CI
0%
Description
This patch enables Redmine's system tests to run on GitHub CI.
- Uses Chrome and ChromeDriver pre-installed on GitHub Actions' Ubuntu images.
- Enables
continue-on-error
for a period, so that system test failures do not cause the entire test suite to fail. - Confirmed all tests pass with patches #42422 and #42687 applied.
Details¶
Use Chrome/ChromeDriver pre-installed on Ubuntu images¶
GitHub Actions' Ubuntu images come with Chrome and ChromeDriver pre-installed, and these seem to be generally updated to the latest stable versions.
I believe this is the best option unless there's a need to test against specific or multiple versions of Chrome.
I considered the following alternative methods, but still believe this approach is the best:
- Using
selenium/standalone-chrome
image as a service container: As mentioned in Mounting volumes to retrieve downloaded files , correctly enabling download functionality requires setting up a directory with appropriate permissions before the container starts. However, when using service containers, it's not possible to perform operations before the container starts. - Directly running
npx @puppeteer/browsers install
to set up Chrome (Chrome for testing) and ChromeDriver: This requires additional setup, such as adding the installed Chrome and ChromeDriver paths to the system's PATH. - Installing with
apt install google-chrome-stable
: This requires additional configuration forapt install
, such as registering package repositories.
Enable continue-on-error
¶
Once patches #42422 and #42687 are applied, system tests should be reasonably stable, but may still occasionally fail. Therefore, for a period, continue-on-error
will be enabled so that system test failures do not cause the entire test suite to fail.
System test failures can be identified by errors outputted on the job summary page as shown below. Screenshots of failures can also be downloaded.
Total test time increases by about 2 minutes¶
Running system tests will increase the total test time by approximately 2 minutes. I plan to propose test parallelization to address this in the future.
Files
No data to display