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

Switch to Github Actions #3152

Merged
merged 36 commits into from
Mar 20, 2020
Merged

Switch to Github Actions #3152

merged 36 commits into from
Mar 20, 2020

Conversation

francislavoie
Copy link
Member

This may or may not be nicer than Azure Pipelines (same backend, different UI, slightly different config)

Supersedes #3149, trying to get CI to trigger.

@francislavoie
Copy link
Member Author

Well that's good, CI triggered but it's obviously not ready yet. Still WIP.

@francislavoie
Copy link
Member Author

francislavoie commented Mar 17, 2020

Well, tests work, lint doesn't yet, integration tests also don't work yet, build fails on windows, lint with reviewdog doesn't work on mac (do we care though? can we just run lint on one platform? Is that enough @mholt?)

Gonna put this off until another day 😥

@mholt
Copy link
Member

mholt commented Mar 17, 2020

Why do we need to use "reviewdog" anyway - what is it?

/cc @sarge about the integration tests

@sarge
Copy link
Collaborator

sarge commented Mar 17, 2020

Yes @mholt we can drop the integration tests, we can run them in process - so we don't have to start and stop a separate caddy process.

@francislavoie
Copy link
Member Author

Why do we need to use "reviewdog" anyway - what is it?

golangci-lint wasn't installing on windows, so I googled alternatives and found that - thought it looked cool and figured it might be worth trying, adds comments inline to PRs for the reported issues. See https://github.com/reviewdog/action-golangci-lint

I'm not married to it, I was just trying something 😛

Acknowledged @sarge I'll take that out 👍

@francislavoie
Copy link
Member Author

I... think I did it, guys!

🎉

I'm not sure what to do about test/coverage reporting, would appreciate some thoughts there.

Please review!

@francislavoie francislavoie changed the title WIP: Set up work-in-progress github actions workflows Switch to Github Actions Mar 20, 2020
@francislavoie francislavoie added under review 🧐 Review is pending before merging and removed do not merge ⛔ Not ready yet! labels Mar 20, 2020
@mohammed90 mohammed90 linked an issue Mar 20, 2020 that may be closed by this pull request
Copy link
Member

@mohammed90 mohammed90 left a comment

Choose a reason for hiding this comment

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

Thanks for tackling this, Francis! 😃 I'm catching up on the whole Github Actions stuff, but left a few comments for the stuff I know from the top of my head.
Now that we're using Github-native CI, can we add automated releases? I've seen a few actions that prepare releases as draft on pushes of tags. We just need to figure out how to stitch them together.

- name: Checkout code
uses: actions/checkout@v2

- name: Install test and coverage analysis tools
Copy link
Member

Choose a reason for hiding this comment

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

Those were needed because Azure uses JUnit XML format for test result reporting. I haven't found anything as straightforward for Github Actions. There's a workaround described here:
https://github.community/t5/GitHub-Actions/Publishing-Test-Results/m-p/37236/highlight/true#M2860

Seems like a bit of a hassle though. Let's research more. Otherwise, we'll have to pull more tooling, unfortunately.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
# TODO publish coverage/lint/test results ?

# To return the correct result even though we set 'continue-on-error: true'
- name: Coerce correct build result (Windows)
Copy link
Member

Choose a reason for hiding this comment

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

These were needed earlier to bypass the test failures so we can publish the test results. Keeping or removing this step depends on how end up setting up the publishing of test/coverage/lint results.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep. I just wanted to keep these ideas intact, I wasn't sure how we'd do result reporting.

.github/workflows/fuzzing.yml Show resolved Hide resolved
.github/workflows/fuzzing.yml Outdated Show resolved Hide resolved
.github/workflows/fuzzing.yml Outdated Show resolved Hide resolved
.github/workflows/fuzzing.yml Outdated Show resolved Hide resolved
@francislavoie
Copy link
Member Author

francislavoie commented Mar 20, 2020

Fuzzing failure now is just due to the missing API key.

@mholt I think we'll need you to set the secret. See the instructions here https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets

The name for the secret we need is FUZZIT_API_KEY

@mholt
Copy link
Member

mholt commented Mar 20, 2020

Wow, great work @francislavoie! I can even see the test output in the Checks tab.

I set the API key as a secret. Please take another look!

This will be a relief to have working again :)

@mholt
Copy link
Member

mholt commented Mar 20, 2020

FUZZER: ==18== ERROR: libFuzzer: fuzz target overwrites it's const input
FUZZER: SUMMARY: libFuzzer: out-of-memory

Is that different from a "crasher" caught by fuzzing?

@francislavoie
Copy link
Member Author

francislavoie commented Mar 20, 2020

Yeah, regression testing fails for some reason. I think we might need to bug the fuzzit guys for some help. I have no idea what to do with that. @mohammed90 agreed we should just ignore it for now

@mholt
Copy link
Member

mholt commented Mar 20, 2020

I opened an issue upstream. fuzzitdev/fuzzit#57

Copy link
Member

@mholt mholt left a comment

Choose a reason for hiding this comment

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

This is awesome @francislavoie , thanks for the hard work!

If it's not too much trouble, could we add comments everywhere there is a commented section (or line) so that we can clearly remember/know why it is commented?

.github/workflows/ci.yml Show resolved Hide resolved
Copy link
Member

@mholt mholt left a comment

Choose a reason for hiding this comment

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

LGTM!

I liked Azure but it was hecka complicated. I know it's the same backend infrastructure but this integration just seems better, which makes sense.

Thanks for all the effort, both of you!

@mholt mholt merged commit 76ac28a into v2 Mar 20, 2020
@mholt mholt deleted the v2-github-actions-test branch March 20, 2020 14:38
@mholt mholt removed the under review 🧐 Review is pending before merging label Mar 20, 2020
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.

Move CI process to GitHub Actions and add CD pipelines
4 participants