Commit graph

79 commits

Author SHA1 Message Date
Sergei Petrosian
098e5e1efb ci: Fix missing slash in ARTIFACTS_URL
Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2024-08-05 08:19:33 +02:00
Sergei Petrosian
f38d43628b
ci: Add workflow for ci_test bad, use remote fmf plan (#712)
* Remove plan from role dir, it's too complicated and long to run tests from tmt
* Use plan from linux-system-roles/tft-tests
* Move getting datetime to testing-farm job where it's used
* Add a workflow for running [citest_bad]
* Bump sclorg/testing-farm-as-github-action to v3
* Move concurrency group to first job
* Dump GitHub context

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2024-08-02 15:41:17 +02:00
dependabot[bot]
d9381bc24e ci: bump sclorg/testing-farm-as-github-action from 2 to 3
Bumps [sclorg/testing-farm-as-github-action](https://github.com/sclorg/testing-farm-as-github-action) from 2 to 3.
- [Release notes](https://github.com/sclorg/testing-farm-as-github-action/releases)
- [Commits](https://github.com/sclorg/testing-farm-as-github-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: sclorg/testing-farm-as-github-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 16:32:44 -06:00
Sergei Petrosian
773d1c17a2
ci: Update fmf plan to add a separate job to prepare managed nodes (#708)
* Add a preparation job to run on managed nodes
* Update instructions to run tests locally
* From tft workflow, remove condition for commenter author_association.
  This would require us to add all trusted users, running workflow is not dangerous.
* Keep the plan minimal, only run prep steps required to install beakerlib

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2024-07-30 17:03:57 +02:00
Sergei Petrosian
f45b70a8f5 ci: Add tft plan and workflow
This change is for running tests in Testing Farm CI. This is a replacement for
BaseOS CI that we are currently using. Running it Testing Farm gives us more
control.

It adds a workflow for running tests, and a plans directory containing a test
plan and a README-plans.md with some info.

Note that this workflow runs from the main branch. This means that changes to
the workflow must be merged to main, then pull requests will be able to run it.
This is because the workflow uses on: issue_comment context, this is a security
measure recommended by GitHub. It saves us from leaking organization secrets.

The functionality is WIP, so await future fixes and updates.

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2024-07-25 10:48:44 +00:00
Rich Megginson
008fe5cd3b ci: ansible-lint action now requires absolute directory
the change made for
b4018c22f8
means that ansible-lint now needs an absolute path for the working directory

Go ahead and make ansible-test use absolute path too just in case they decide
to make the same change.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-06-26 08:53:58 -06:00
Rich Megginson
b0517d1cfb ci: tox-lsr 3.4.0 - fix py27 tests; move other checks to py310
The latest version of virtualenv does not support creating
python 2.7 virtualenvs.  Change our CI tests to restrict the version
of virtualenv<20.22.0 and tox<4.15 for py27 environments

Move pylint, flake8, and black checks to the py310 environment
which is currently supported by ansible-core 2.17 and its related
checkers such as ansible-lint and ansible-test

pylint now uses ansible-core 2.17 and restricts the version of
pylint to 3.1.0 which is the version used by ansible-test 2.17

Remove `extends: default` for .yamllint.yml.  The latest version
of ansible-lint will automatically incorporate local yamllint
settings unless there is an `extends:`.

The above changes require some fixes to the role code.

For more information, see
https://github.com/linux-system-roles/tox-lsr/pull/168
and
https://github.com/linux-system-roles/tox-lsr/pull/170

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-06-04 18:09:20 -06:00
Rich Megginson
03e3b788ff ci: use tox-lsr 3.3.0 which uses ansible-test 2.17
Upgrade ci tests to use tox-lsr 3.3.0

tox-lsr 3.3.0 uses ansible-test 2.17

Create the ansible-test ignore file for 2.17

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-05-31 09:10:47 -06:00
dependabot[bot]
b4174b837f ci: Bump mathieudutour/github-tag-action from 6.1 to 6.2
Bumps [mathieudutour/github-tag-action](https://github.com/mathieudutour/github-tag-action) from 6.1 to 6.2.
- [Release notes](https://github.com/mathieudutour/github-tag-action/releases)
- [Commits](https://github.com/mathieudutour/github-tag-action/compare/v6.1...v6.2)

---
updated-dependencies:
- dependency-name: mathieudutour/github-tag-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-02 10:56:39 -04:00
dependabot[bot]
4aef173aea
ci: Bump ansible/ansible-lint from 6 to 24 (#677)
Bumps [ansible/ansible-lint](https://github.com/ansible/ansible-lint) from 6 to 24.
- [Release notes](https://github.com/ansible/ansible-lint/releases)
- [Commits](https://github.com/ansible/ansible-lint/compare/v6...v24)

---
updated-dependencies:
- dependency-name: ansible/ansible-lint
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-01 15:46:58 +01:00
Rich Megginson
6c74dee859 ci: fix python unit test - copy pytest config to tests/unit
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to
3.2.2, not just the python unit tests, even though the fix is only related to
pytest.  All roles are updated to use tox-lsr 3.2.2 for the sake of consistency
even if not affected by the pytest issue.

Something changed recently in the way github actions provisions systems which
means some of the directories are not readable by the python unit test actions.
In addition, the python unit tests were causing a lot of unnecessary directory
traversal doing collection/discovery of unit test files, because of using
`pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the
directory of the config file is the root directory for the tests and tests
discovery, and there is no way around this.

Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the
`tests/unit` directory, which makes that the test root directory.

See also https://github.com/linux-system-roles/tox-lsr/pull/160

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-02-05 17:14:33 -07:00
dependabot[bot]
779eb87a31 ci: Bump codecov/codecov-action from 3 to 4
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-01 14:36:29 -07:00
Rich Megginson
735d4befa7 ci: Use supported ansible-lint action; run ansible-lint against the collection
The old ansible-community ansible-lint is deprecated.  There is a
new ansible-lint github action.

The latest Ansible repo gating tests run ansible-lint against
the collection format instead of against individual roles.
We have to convert the role to collection format before running
ansible-test.

This also requires tox-lsr 3.2.1 - bump other actions to use 3.2.1

Role developers can run this locally using
`tox -e collection,ansible-lint-collection`
See https://github.com/linux-system-roles/tox-lsr/pull/125

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-01-12 07:46:51 -07:00
dependabot[bot]
15e705dd95 ci: Bump actions/setup-python from 4 to 5
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-03 13:25:06 -07:00
dependabot[bot]
fc593dcffa ci: Bump github/codeql-action from 2 to 3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-03 13:24:24 -07:00
dependabot[bot]
d21b60f30d ci: bump actions/github-script from 6 to 7
Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 7.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-01 14:56:36 -07:00
Rich Megginson
a9f20cb87b ci: tox-lsr version 3.1.1
This is primarily for the update to ansible-plugin-scan to
work with the upcoming ostree changes, but also includes
some minor fixes which affect ci.
3.1.0 was released but not used due to a bug fixed in 3.1.1
See full release notes for 3.1.0 and 3.1.1
https://github.com/linux-system-roles/tox-lsr/releases

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-10-11 08:25:08 -06:00
Rich Megginson
e82aca60d0 ci: use dump_packages.py callback to get packages used by role
This adds the dump_packages.py callback which will dump the
arguments to the `package` module (except for `state: absent`)
to the integration test run logs.  The output looks like this:
`lsrpackages: pkg-a pkg-b ...`
We will have tooling which will scrape the logs to extract the
packages used at runtime and testing for all of the supported
combinations of distribution and version.

This also ensures the weekly-ci PR git commit message conforms
to commitlint.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-10-05 18:01:49 -06:00
dependabot[bot]
1801ae7870 build(deps): bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-02 14:56:28 -06:00
Sergei Petrosian
44e5983185
ci: Remove badges from README.md prior to converting to HTML (#633)
- Remove thematic break after badges
- Remove badges from README.md prior to converting to HTML

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2023-08-28 12:16:58 +02:00
Sergei Petrosian
cd7eafe009
ci: Make badges consistent, run markdownlint all .md files (#631)
- Consistently generate badges for GH workflows in README RHELPLAN-146921
- Run markdownlint on all .md files
- Add custom-woke-action if not used already
- Use woke from linux-system-roles/lsr-woke-action

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2023-08-24 08:19:05 +02:00
Sergei Petrosian
4dd282e0c5 ci: Add markdownlint, test_html_build, and build_docs workflows
- markdownlint runs against README.md to avoid any issues with
  converting it to HTML
- test_converting_readme converts README.md > HTML and uploads this test
  artifact to ensure that conversion works fine
- build_docs converts README.md > HTML and pushes the result to the
  docs branch to publish dosc to GitHub pages site.
- Fix markdown issues in README.md

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2023-08-14 08:51:31 -06:00
Rich Megginson
4371036f14 ci: fix python 2.7 CI tests by manually installing python2.7 package
We use the setup-python github action.  This has dropped support for
python 2.7.  Instead, just manually install the python2.7 package.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-06-28 16:04:06 -06:00
Sergei Petrosian
e791fb9440 ci: Rename commitlint to PR title Lint, echo PR titles from env var
Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2023-06-22 07:42:01 +02:00
Sergei Petrosian
f07e275282 ci: Add pull request template and run commitlint on PR title only
We now ensure the conventional commits format only on PR titles and not on
commits to let developers keep commit messages targeted for other developers
i.e. describe actual changes to code that users should not care about.
And PR titles, on the contrary, must be aimed at end users.

For more info, see
https://linux-system-roles.github.io/contribute.html#write-a-good-pr-title-and-description

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2023-06-13 11:23:21 -06:00
Rich Megginson
391617cc5c ci: Use tox-lsr 2.13 for py26
tox-lsr 3.x does not support python 2.6, so use tox-lsr 2.13 for
py26 testing.  This should be fine until we can drop support for
python 2.6

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-06-05 12:40:29 -06:00
Rich Megginson
2ce6f3afa7 ci: update tox-lsr to version 3.0.0
The major version bump is because tox-lsr 3 drops support
for tox version 2.  If you are using tox 2 you will need to
upgrade to tox 3 or 4.

tox-lsr 3.0.0 adds support for tox 4, commitlint, and ansible-lint-collection

See https://github.com/linux-system-roles/tox-lsr/releases/tag/3.0.0
for full release notes

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-05-17 10:17:19 -06:00
Sergei Petrosian
7884537284 ci: Add commitlint GitHub action to ensure conventional commits with feedback
For more information, see Conventional Commits format in Contribute
https://linux-system-roles.github.io/contribute.html#conventional-commits-format

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2023-04-28 14:36:36 +02:00
Rich Megginson
c8d3f1dc69 update tox-lsr to 2.13.2; update ansible-lint configuration; start of support for merge queues
Update tox-lsr to 2.13.2

Update ansible-lint configuration

Add support for merge queues to github actions
This doesn't mean all system roles support merge queues,
this is just a preliminary step

See https://github.com/linux-system-roles/.github/pull/21

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-03-10 16:58:58 +08:00
dependabot[bot]
47898bab1f Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-01 17:15:42 +01:00
Wen Liang
c030e50853 Add needed status check on the merge_group
When adding an approved PR to the merge queue, the required status
checks of the workflows are missing, which prevents the PR getting
merged. This commit is intended to trigger merge group checks with
Github Actions, so that the workflows will report the needed status
checks.

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2023-02-27 11:03:22 -07:00
Wen Liang
77020c28fa Fix CentOS 7 integration tests
The newest ubuntu upgrade (ubuntu-22.04) in the github actions runner
image causes the CentOS 7 integration tests broken, to fix it, specify
the ubuntu-20.04 runner image for the CentOS 7 integration tests.

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2023-02-13 17:47:55 +01:00
Rich Megginson
0905ccdbf9 Upload coverage files to codecov
Add a github action task to upload the coverage files
to codecov after the unit tests are complete.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-02-11 07:36:32 +01:00
Rich Megginson
482560f43a use tox-lsr version 2.13.2
Use tox-lsr version 2.13.2 in order to pick up the codecov
fix.
https://github.com/linux-system-roles/tox-lsr/pull/109

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-02-11 07:35:49 +01:00
Rich Megginson
4039701f30 add back python-26 unit test
The PR https://github.com/linux-system-roles/network/pull/556
erroneously removed the python-26 job for unit testing.  This
PR adds it back.

See also https://github.com/linux-system-roles/.github/pull/10

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-02-10 21:41:35 +01:00
Rich Megginson
39a78d1740 add contents: write permission for branch push
Need `contents: write` permission for branch push for weekly ci job

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-02-09 12:46:34 -07:00
Rich Megginson
9ee0e98b77 Create separate github actions for various checks; get rid of monolithic tox.yml
There are now separate github actions for the various tests, instead of all of
them being done as part of the tox tests in tox.yml - ansible-lint,
ansible-test, etc.

Use the officially supported github actions e.g. for ansible-lint, ansible-test,
rather than using our own from `tox-lsr` and trying to keep up with the latest
changes.  Developers will still be able to use `tox-lsr` on their local
development environments to run these tests in the same way that they are run in
github actions, so that errors found when submitting PRs can be reproduced and
corrected locally without too many github UI roundtrips.

Using separate github actions, and especially the official github actions which
generally have support for in-line comments, should help greatly with
readability and troubleshooting test results.

Python tests are removed from roles that do not use python.

Python tests are now done by python-unit-tests.yml which also does the black,
flake8, and pylint tests.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-01-31 08:59:53 -07:00
Noriko Hosoi
75f2448ba7 Add check for non-inclusive language
Add a check for usage of terms and language that is considered
non-inclusive. We are using the woke tool for this with a wordlist
that can be found at
https://github.com/linux-system-roles/tox-lsr/blob/main/src/tox_lsr/config_files/woke.yml

Note: this commit uses the customized woke placed locally in
    .github/actions/custom-woke-action to support a new option
    --count-only-error-for-failure option.
    The local action custom-woke-action will be replaced with
    the official woke once https://github.com/get-woke/woke/pull/252
    (Add an option "--count-only-error-for-failure") is processed.

Signed-off-by: Noriko Hosoi <nhosoi@redhat.com>
2023-01-19 15:13:35 -07:00
Rich Megginson
385c27420e Use tox-lsr 2.13.1; force the use of tox 3.x [citest skip]
CI is broken pretty hard right now due to tox 4.x being released
It will take non-trivial effort to make tox-lsr work with tox 4.x. So,
in the meantime, tox-lsr 2.13.1 forces the use of tox 3.x

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2022-12-08 12:09:18 -07:00
Rich Megginson
f2e28ff0a6 python version depends on platform; upgrade checkout, setup-python; support py311 [citest skip]
The python version used now requires a corresponding os version e.g. python 2.7 and
python 3.6 are no longer supported on ubuntu-latest - must use 20.04.  Update
the python matrix to include the os to use as well.

Use checkout@v3 and setup-python@v4

python 3.11 stable is now supported by setup-python

Add `push` action for status reporting on role main page if missing

Use `docker` for ansible-test if not already doing that

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2022-11-30 10:31:58 -07:00
Rich Megginson
af4c851d5c disable scheduled ci for now 2022-11-18 10:29:05 -07:00
Evgeny Fedin
120018ee52 add weekly-ci action
Signed-off-by: Evgeny Fedin <efedin@redhat.com>
2022-11-17 10:08:57 -07:00
Rich Megginson
f5a01f94bf [citest skip] tox-lsr 2.13.0; check-meta-versions
Update to tox-lsr 2.13.0 - this adds check-meta-versions to py310

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2022-08-16 07:36:13 -06:00
Rich Megginson
26c742d7e3 Use GITHUB_REF_NAME as name of push branch; fix error in branch detection [citest skip]
We need to get the name of the branch to which CHANGELOG.md was pushed.
For now, it looks as though `GITHUB_REF_NAME` is that name.  But don't
trust it - first, check that it is `main` or `master`.  If not, then use
a couple of other methods to determine what is the push branch.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2022-08-04 11:58:44 -04:00
Noriko Hosoi
38a84ca16b [citest skip] Add changelog_to_tag.yml to .github/workflows
Description:
When a new changelog section is added to CHANGELOG.md and pushed,
changelog_to_tag.yml is triggered, which generates a new tag and
a new release.

Example of CHANGELOG.md changes:
  [9.9.9] - 2022-12-31
  --------------------

  ### New features

  - New feature A

  ### Bug fixes

  - Bug fix B

Using this example, when the commit on CHANGELOG.md is pushed, a
new tag "9.9.9" is added and Version 9.9.9 is released in github.
If tag "9.9.9" already exists, the CHANGELOG.md push fails.

Signed-off-by: Noriko Hosoi <nhosoi@redhat.com>
2022-07-10 21:22:20 -04:00
Rich Megginson
bf6215dab8 [citest skip] bump tox-lsr version to 2.11.0; remove py37; add py310
tox-lsr version 2.11.0 has support for collection-requirements.yml,
runqemu improvements, and support for python 3.10

python 3.7 is not used on any supported platform, so remove it

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2022-05-09 13:21:51 -06:00
Till Maas
d3a7124f07 GitHub CI: Trigger on main branch
The network role is using `main` for the default branch, so this needs
to be used in the workflow definition.

Signed-off-by: Till Maas <opensource@till.name>
2022-03-11 15:55:25 +01:00
Rich Megginson
a029152e16 use tox-lsr version 2.10.1
Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2022-02-21 21:20:04 +01:00
Till Maas
cf04059fc8 test: Use new py26 environment
Signed-off-by: Till Maas <opensource@till.name>
2022-02-18 09:57:46 +01:00
Rich Megginson
206c354b7e [citest skip] bump tox-lsr version to 2.9.1
Signed-off-by: Rich Megginson <rmeggins@redhat.com>

The new tox-lsr also requires the use of `{toxinidir}` for the
local config file paths.
2022-02-07 18:58:27 -07:00