Skara offers two ways for contributors to test their changes before they are integrated:
- The /test pull request command
- Automatic testing via GitHub Actions
This page will describe This page describes how do testing with the help of GitHub Actions.
Table of Contents | ||
---|---|---|
|
...
If a contributor has run testing with the help of GitHub Actions then the Skara bots will automatically display a summary of the build and test results in the pull request body. Anyone can see the result of the builds and tests, but only the contributor can analyze the logs. checks area. Please see the GitHub documentation for how to view the logs from a build and/or test run. Additional output from the test execution is preserved as a artefact that can be downloaded.
Conditionally enable/disable builds and tests
...
Contributors can choose to only enable automatic builds and tests for commits pushed to branches with certain nameswhose names are prefixed with submit/. To enable this the contributors creates a GitHub Secret with the name JDK_TESTSUBMIT_ENABLEFILTER
. The value of JDK_TEST_ENABLE
is a regular expression denoting the branch names for which commits should be tested. For example, setting the secret JDK_TEST_ENABLE
to test-.*
makes automatic builds and tests only being run for commits pushed to branches whose names matches the regular expression test-.*
. The default value for JDK_TEST_ENABLE
is .*
.Contributors can choose to disable automatic builds and tests for commits pushed to branches with certain namesSUBMIT_FILTER
should be set to a non-empty string, preferably something random (instead of 1 or true) as the GitHub log viewer will hide any occurrences of this string (as it could potentially be an actual secret like a password). When this is set, testing can be triggered manually by a command such as this:
Code Block | ||
---|---|---|
| ||
git push origin <name-of-my-branch>:submit/<name-of-my-branch> # Replace <name-of-my-branch> with an actual branch name |
It is also possible to only run tests on a subset of platforms. To enable this the contributors creates a creates a GitHub Secret with the name JDK_TESTSUBMIT_DISABLEPLATFORMS
. The value of JDK_TEST_DISABLE
is a regular expression denoting the branch names for which commits should not be tested. For example, setting the secret JDK_TEST_DISABLE
to wip-.*
makes automatic builds and tests not being run for commits pushed to branches whose names matches the regular expression wip-.*
. The default for JDK_TEST_DISABLE
is wip(-|/).*|master
.SUBMIT_PLATFORMS
should be set to a string listing the enabled platforms. Include one or more of the following platform names:
- Linux x64
- Linux x86
- Linux additional (hotspot only)
- Windows x64
- macOS x64
Running locally
The run the same tests that are being run using GitHub Actions locally, run the following command:
Code Block | ||
---|---|---|
| ||
$ make test-tier1 |
Note that the GitHub Actions runs the above tests both with release and debug builds. For more information about how to run tests locally, see doc/testing.md.
...