Skip to content

Run the integration tests only when needed#690

Merged
lslezak merged 3 commits intomasterfrom
integration_test_runs
Aug 4, 2023
Merged

Run the integration tests only when needed#690
lslezak merged 3 commits intomasterfrom
integration_test_runs

Conversation

@lslezak
Copy link
Copy Markdown
Contributor

@lslezak lslezak commented Aug 4, 2023

Problem

  • Running the integration tests in the CI always is quite expensive, usually they take 8-10 minutes
  • There are many cases when running integration tests is not needed and it just wastes resources and you need to wait longer before merging a pull request

Some examples when the integration tests should be skipped (if only these components are updated):

  • Updating the command line interface
  • Updating a README file or any documentation files
  • Updating an unit test
  • Updating examples
  • Updating *.spec or *.changes files

Note

We also run the CI after any commit to a branch. Which means it can also help in this scenario:

  • You create a branch and commit a code fix there
  • Later you find out that an unit test fails
  • You fix the unit test in another commit

The integration tests will run for the first commit but not for the second. When you create a pull request from that branch both integration and unit tests will run.

Solution

  • Use path matching and run the integration tests only when a file relevant for the integration tests is updated
  • The path list is not set in stone, we will need to adapt it if some files a removed or new ones are added.

lslezak added 2 commits August 4, 2023 12:07
Use path patterns in the GutHub Action to set when they should be started
@coveralls
Copy link
Copy Markdown

coveralls commented Aug 4, 2023

Coverage Status

coverage: 72.158%. remained the same when pulling f127e0d on integration_test_runs into 9c7a6ad on master.

Co-authored-by: Imobach González Sosa <igonzalezsosa@suse.com>
@lslezak lslezak merged commit d0834ac into master Aug 4, 2023
@lslezak lslezak deleted the integration_test_runs branch August 4, 2023 13:09
@imobachgs imobachgs mentioned this pull request Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants