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

Run pytest in qemu from gitlab CI #18

Merged
merged 4 commits into from Sep 20, 2019
Merged

Conversation

bentiss
Copy link
Collaborator

@bentiss bentiss commented Sep 20, 2019

I initially wanted to wait for #16 to be merged first, but looks like it's taking too much time.

This basically enables true CI for this project: whenever we push something, a pipeline is triggered on https://gitlab.freedesktop.org/bentiss/libratbag-tests which will clone the repo, and run a full pytest in qemu.

bentiss and others added 4 commits September 20, 2019 10:53
plain first test from the template and few tweaks

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
as a github action

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
So that we notify github of the pending CI at the earliest
moment.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Based on a commit by @FFY00 on `libratbag/libratbag`

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
p = None
logs = f'ratbag-emu-log-{strftime("%Y-%m-%d_%H-%M")}'
with open(f'{logs}-stdout.txt', 'w') as stdout, \
open(f'{logs}-stderr.txt', 'w') as stderr:
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 any way for this files to be recovered from the CI?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sure, I can add those as artifacts.

On this note, I should rewrite the whole libratabg-tests history, but I'll be out for the next 2-3 weeks in conferences, so I wanted to get the PR in first.

Copy link
Member

Choose a reason for hiding this comment

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

Do you think we can get this working before that? Both in here and in libratbag?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

well, too late, I already pushed the button.

I could do it, but I really don't have time right now. I'll try to have it by the end of the day however.

Copy link
Member

Choose a reason for hiding this comment

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

No, I meant do you think we can get the CI working, here and in libratbag, before you leave? If you don't have time I can try to port this to libratbag, I don't think it should be that hard.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ci is already passing for this repo.
The setup has been done so that if the only thing we need is install hid-tools, install requirements.txt, run pytest it should be working for libratbag.

However, there is a chance we will need to manually install ratbag-emu for libratbag, so there might be tweaks to do

@FFY00
Copy link
Member

FFY00 commented Sep 20, 2019

I initially wanted to wait for #16 to be merged first, but looks like it's taking too much time.

Sorry about that, I got tied up in other stuff.

This basically enables true CI for this project: whenever we push something, a pipeline is triggered on gitlab.freedesktop.org/bentiss/libratbag-tests which will clone the repo, and run a full pytest in qemu.

Are github actions enabled? Can we get it to trigger here?

Also, why didn't the normal CI run? You don't seem to have touched it in the PR.

@bentiss
Copy link
Collaborator Author

bentiss commented Sep 20, 2019

Sorry about that, I got tied up in other stuff.

no worries. I wrote a better code, so that's fine :) (kidding)

Are github actions enabled? Can we get it to trigger here?

yes, they are on the entire libratbag organization.
I am not 100% sure it will work for PR, as github is refactoring the way pipelines and checks are running. But for that being checked, I need to enable this in the master branch first.

Also, why didn't the normal CI run? You don't seem to have touched it in the PR.

CI was run on the original commit bentiss@06be5ac

I guess this is where we will have a little bit of baby steps to know when the CI will get run.

@bentiss bentiss merged commit 6f6a21e into libratbag:master Sep 20, 2019
@bentiss bentiss deleted the gh-actions branch September 20, 2019 09:41
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

2 participants