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

Github Actions, on PR and push (+selectivity) #317

Merged
merged 5 commits into from
Mar 2, 2022

Conversation

addshore
Copy link
Contributor

This makes CI run on PRs as well, rather than only on the
underlying branches.
This will lead to the PR jobs actually running with the base of
the PR merged into the head.

Also be more selective about when to run some jobs, so for example
we can now make docs changes, without running the WHOLE build and
test pipeline.

@addshore
Copy link
Contributor Author

This currently doubles the number of jobs that run, which is probably not ideal.

Perhaps we should only run on push on the main branch?
This would lead to PRs always having CI run, and only the main branch having CI run

@addshore
Copy link
Contributor Author

I still don't understand why this PR makes Code scanning results / Anchore Container Vulnerability Report (T0) fail.
I guess I need to do a little more investigation first.

@addshore addshore marked this pull request as draft February 21, 2022 08:27
This makes CI run on PRs as well, rather than only on the
underlying branches.
This will lead to the PR jobs actually running with the base of
the PR merged into the head.

Also be more selective about when to run some jobs, so for example
we can now make docs changes, without running the WHOLE build and
test pipeline.
@toban toban force-pushed the ci-on-pr-and-push-and-selective branch from 86cbb7c to bf1e330 Compare February 22, 2022 08:37
@toban
Copy link
Contributor

toban commented Feb 22, 2022

I thought this had something to do with the git history but did a clean PR of main with these contents and it failed too https://github.com/wmde/wikibase-release-pipeline/pull/323/files

@addshore
Copy link
Contributor Author

addshore commented Mar 2, 2022

The code scanning is just not currently running, (prior to this PR), so perhaps I should just remove it for now...

@addshore addshore marked this pull request as ready for review March 2, 2022 10:39
@addshore addshore requested review from toban and tarrow March 2, 2022 13:08
@toban
Copy link
Contributor

toban commented Mar 2, 2022

The code scanning is just not currently running, (prior to this PR), so perhaps I should just remove it for now...

It's not running in this PR you mean? I can see it ran on the last commit to main. If you wanna get rid of it completely we probably wanna remove each section of build_and_test.yml it's currently not crashing but makes not sense to keep it.

@addshore
Copy link
Contributor Author

addshore commented Mar 2, 2022

It's not running in this PR you mean? I can see it ran on the last commit to main.

The last commit on main for me is https://github.com/wmde/wikibase-release-pipeline/actions/runs/1921632522 and I do not see the scan?
At least not in the way it was failing in this PR.

For this PR the scan was running as a totally seperate workflow

image

But indeed, the scan then also normally runs at the end of the other build and test workflows

https://github.com/wmde/wikibase-release-pipeline/blob/main/.github/workflows/built_and_test.yml#L386-L391

So I should probably add the file back.

But I also guess adding the file triggers something else weird (this other workflow we see in this PR) to run sometimes?

@addshore
Copy link
Contributor Author

addshore commented Mar 2, 2022

Think I found it (maybe??)
image

@toban toban merged commit cd5674f into main Mar 2, 2022
@toban toban deleted the ci-on-pr-and-push-and-selective branch March 2, 2022 15:21
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.

3 participants