How to ignore some tests in CI with GitHub Actions?

Hi,

We have created some automated tests with Selenium and Cucumber, implemented a test runner for local running and now we would implement tests on CI (with Github Actions) to be triggered on every PR.

We have many tests so it takes about 30 minutes to execute all of them, which is clearly too much time in CI.

How can we run just some tests in order to have a quick feedback ?

On internet I have found some suggestions about tags, but I haven’t found how to clarify in the yml file to run only tests with this particular tag.

Filtering with Cucumber is a bit weird; When you do

run: mvn test -Dcucumber.filter.tags="@smoke"

It will only run the tests tagged smoked. If you don’t specify a filter, it runs everything.

(Oh, and you can specify multiple filters at once).

I’m not too familiar with how Surefire interacts with Cucumber, but I’d say try that solution… That way, no-one has to manage which tests are tagged or not; It’ll be a bit more straightforward.