33 Commits
Author SHA1 Message Date
William Douglas 23a9a44571 Make github action shellcheck run on PRs
Modify the shell check workflow to operate on the same events as the
swupd tests.

Signed-off-by: William Douglas <william.douglas@intel.com>
2025-03-26 16:55:13 -07:00
William Douglas abea281722 Update github actions
Signed-off-by: William Douglas <william.douglas@intel.com>
2024-10-17 11:23:22 -07:00
William Douglas e01b473251 Switch to clang-format as a github action
Instead of having this be a local test, have a format target for the
Makefile and use a github action for clang-format to avoid differences
between developer systems clang-format and runner clang-format
versions.

Signed-off-by: William Douglas <william.douglas@intel.com>
2023-04-25 14:44:10 -07:00
William Douglas bf3b0201c3 Fetch entire git tree for master comparison
The api test needs to compare the current commit on the remote branch
to the master branch. Based on the documentation, 'fetch-depth: 0' is
intended to fetch all branches and tags.

Signed-off-by: William Douglas <william.douglas@intel.com>
2023-02-28 13:25:05 -08:00
William Douglas ca3b07cf5e Update to use latest checkout action
Update all workflow's checkout action to the latest version.

Signed-off-by: William Douglas <william.douglas@intel.com>
2023-02-28 13:25:05 -08:00
William Douglas a425393c87 Update cache action
Old action was using deprecated API.

Signed-off-by: William Douglas <william.douglas@intel.com>
2023-02-17 12:58:05 -08:00
Otavio Pontes 5ff46653cf actions: Create another job to check for API changes
Create another github job to check if the API has been changed in this
PR, so it will be easier to notice that a broken test is just an API
broken test

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2020-05-14 10:45:46 -07:00
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
Otavio Pontes 3a689186dc Update issue templates 2019-02-13 14:26:12 -08:00