Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make isotovideo workflows more GitHub Native #29

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

josegomezr
Copy link
Contributor

@josegomezr josegomezr commented Dec 20, 2023

  • Improved isotovideo example workflow, it can be easily extended with a matrix as per GitHub Actions docs 0.

    It brings:

    • A perl script for checking the test results, to remove jq usages. Should isotovideo provide that feature, the script can be discarded.
    • Pipeline Artifacts, it's possible to inspect the test results after a run.

    And now the example workflow is green and not repeated.

  • Skip job openQA if credentials are not configured

poo#138416

The example action now starts green.

steps:
- uses: actions/checkout@v2
- name: Run isotovideo against test code in happy-path scenario
run: podman run --rm -it -v .:/tests:Z registry.opensuse.org/devel/openqa/containers/isotovideo:qemu-x86 qemu_no_kvm=1 casedir=/tests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As explained in #28 on multiple places, in particular #28 (comment) , I am not convinced we should do that change from a single podman call to a github workflow specific syntax. There are of course some advantages but as disadvantages I see that people can not just copy-paste that line to reproduce. I would go even further and extract that line into a Makefile so that github CI same as users can just call make test-isotovideo-happy-path without duplication.

Comment on lines 27 to 32
if [[ -z "$OPENQA_API_KEY" && -z "$OPENQA_API_SECRET" ]]; then
echo "Skipping openQA scheduling step: No API Keys configured."
echo "Configure OPENQA_API_KEY & OPENQA_API_SECRET secrets"
exit 0
fi

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this fails without error then tests would be silently skipped. I don't think this is a good idea

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failing it always is not a good idea either, what about scheduling only if the envs are set?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the motivation to use this workflow without valid credentials? That feels wrong

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quick heads up: on Jan 14th I added an optional clause for the workflow so it's not scheduled.

7982db8#diff-de0e4ae603aa915aebe97e563c4ffe51dfe10881cc9904c4dfe0c39faebbffd6R22

scripts/validate-test-results Outdated Show resolved Hide resolved
@josegomezr
Copy link
Contributor Author

Removed validate-test-results script as isotovideo now has a shiny new flag --exit-status-from-test-results

@kalikiana kalikiana requested a review from a team February 9, 2024 17:24
# see: https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#example-expanding-configurations
isotovideo-args:
- "--exit-status-from-test-results qemu_no_kvm=1 casedir=."
runs-on: ubuntu-20.04
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to run it on older ubuntu version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

none whatsoever, I seem to recall ubuntu-latest was not the real latest when I started it. I'll throw in ubuntu-latest and see how it behaves

- Improved isotovideo example workflow, it can be easily extended
  with a matrix as per GitHub Actions docs [0].

  It brings:
  - A perl script for checking the test results, to remove `jq`
    usages.
  - Pipeline Artifacts, it's possible to inspect the test
    results after a run.

  And now the example workflow is green and not repeated.

- Skip job openQA if credentials are not configured.

[0]: https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#example-expanding-configurations

Co-authored-by: Martchus <martchus@gmx.net>
Co-authored-by: Tina Müller <cpan2@tinita.de>
Co-authored-by: Oliver Kurz <okurz@suse.de>
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.

None yet

4 participants