Commit Graph
25 Commits
Author SHA1 Message Date
Otavio Pontes 13752fa9ca actions: Validate if all tests are going to be executed
Validate if we are really calling make check for all tests in
test/functional directory.

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2020-04-10 09:58:46 -07:00
Otavio Pontes 79d0c712aa testlib: Generate swupd certificates for each test to be execute
Instead of requiring an external script (.prereq) to generate the certificates
we can regenerate them before running each test.

Also removes completly the .prereq script

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2020-04-02 10:35:54 -07:00
Otavio Pontes 2fe40faf10 test: Group tests that can be run only on in CI
2 groups were created:
 - slow: Tests that are very slow because of sleeps, so we can run them all
   in parallel
 - system: Tests that make change to the system, so they can cause problems
   when running in parallel, so we run them in series.

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2020-04-01 08:38:15 -07:00
Otavio Pontes e9739d9eb3 actions: cache dependencies for swupd
Some packages we need to build swupd are not available on ubunutu-latest
so we need to download and build from source. This process is slow and
caching can save us some significant time on build.
2020-03-27 15:34:41 -07:00
Otavio Pontes 0b940afdc8 actions: Create a success job to make it easier to check if workflow is ok
It's a bit hard to configure github to block PRs when we change the name of
tests, so keep one with a constant name to validate PRs

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2020-03-26 15:44:04 -07:00
Otavio Pontes 3019a7adaa actions: group scripts that are only relevant to github actions
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2020-03-26 15:44:04 -07:00
Otavio Pontes 18c3cc853e actions: Rename github actions job to better names
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2020-03-26 15:44:04 -07:00
Otavio Pontes 1ad51a7fdb actions: Only run shellcheck-all on pushes to master branch
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2020-03-26 15:44:04 -07:00
Otavio Pontes 5ebd1e3033 shellcheck: Add job to run shellcheck all on all merges on master 2020-03-19 09:53:39 -07:00
Otavio Pontes 4a67f4443e Rename variable used to identify if tests are running in a CI
Rename from TRAVIS to RUNNING_IN_CI

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2020-02-20 14:34:44 -08:00
Otavio Pontes d61288464d tests: Auto rebalance tests based on how long they take to long
This patch adds 2 scripts used to balance test execution. The weight_tests.bash
runs all tests and sets a weight to them based on how long they take to run. The
other, filter_bats_list.bash, use this information to split the tests in groups to
be executed by github actions.
When a new test is added the script will consider it with an average weight, so this
shouldn't unbalance the system right away. After some time, if we notice that the
system is not balanced anymore we can just run the weight_tests.bash again to rebalance.

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2020-02-20 13:22:31 -08:00
Otavio Pontes 0d93686356 test: Reduce build time of bats test
There are some build requirements that are only necessary for style check.
Reduce the build time by running them only for style check job.

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2020-02-19 13:31:16 -08:00
Castulo Martinez c6fdf51f39 Rebalancing tests for github actions
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2020-01-29 12:03:28 -08:00
Karthik Prabhu Vinod 79c33d1957 Swupd info: Add functional tests
Closes: #1124

Signed-off-by: Karthik Prabhu Vinod <karthik.prabhu.vinod@intel.com>
2020-01-10 15:25:09 -08:00
Castulo Martinez 24f60f2673 Rebalancing functional tests
This commit separates the 3rd-party tests in their own job since we will
be adding several tests related to 3rd-party in the upcoming days.

This commit also rebalances the tests in the update groups so they are
better balanced.

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2019-11-25 15:13:17 -08:00
Otavio Pontes ac41246a81 3rd_party: Group all 3rd-party repo operations tests
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-11-21 16:34:46 -08:00
Otavio Pontes b3771c9491 actions: Test make distcheck on github actions
Distcheck is light now, so adding it to github actions to make sure
we aren't breaking the build on a dist package

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-11-19 12:05:40 -08:00
Otavio Pontes 50327fc9d3 Makefile: Change behavior of make check
Now make check is only running unit tests and a new target,
functional-check is used for bat tests. The major win on that
was that now we can use find to look for all bat tests in the
functional library and we don't need to keep the BATS list
updated.

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-11-18 15:48:10 -08:00
Otavio Pontes 5872472b45 actions: Set a timeout of 1 hour to github jobs
Github job timeout is 6 hours, but we are sure that any job will take around
20~30 minutes to run. Set a one hour timeout to make sure that hung jobs aren't
going to be blocking us for a long time.

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-11-13 13:22:28 -08:00
Otavio Pontes d175af3fd5 test: Don't conflict config tests with other tests
Always save the config file in another directory so we won't have
problems on running the config tests in parallel. Before this patch
if you run the config tests in parallel with any other tests you could
end up having false-negatives.

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-11-12 13:15:24 -08:00
Otavio Pontes ad1851e7cc actions: Run tests that are set to run only on CI
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-11-11 16:26:46 -08:00
Otavio Pontes 9428d78ac6 actions: Split bat tests in multiple jobs to run in parallel
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-11-11 16:26:46 -08:00
Otavio Pontes 019a90819c actions: Build dependencies to support swupd builds
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-11-11 16:26:46 -08:00
Otavio Pontes ca2740ba00 actions: Run action on pull request
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-11-06 12:28:06 -08:00
Otavio Pontes b4df05c3fd Add github actions integration 2019-11-06 12:05:26 -08:00