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 tests against nightly CLI bundles #600

Merged
merged 1 commit into from
Jun 28, 2021

Conversation

edoardopirovano
Copy link
Contributor

This PR changes the integration tests of the CodeQL Action to also run against a recent nightly build of the CodeQL bundle. This should help catch compatibility issues arising from changes in the Action earlier.

@edoardopirovano edoardopirovano requested a review from a team as a code owner June 25, 2021 17:41
VERSIONS_JSON='[null, "latest"]'
fi
# Use both `tools: null` and `tools: (nightly URL)` in the integration tests.
VERSIONS_JSON='[null, "${{ steps.get-url.outputs.nightly-url }}"]'
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd like to still be testing against latest because it exercises the hardcoded default configured within the Action repo, and sometimes may be different from both null and nightly. Can we matrix over all three?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, done!

Copy link
Contributor

@adityasharad adityasharad left a comment

Choose a reason for hiding this comment

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

Looks good, thanks! Hopefully won't make too many matrixed jobs, otherwise we might have to split up the workflow. Merge after the nightly bundle is published.

# Just use `tools: null` to avoid duplication in the integration tests.
VERSIONS_JSON='[null]'
# Skip `tools: latest` since it would be the same as `tools: null`
VERSIONS_JSON='[null, "${{ steps.get-url.outputs.nightly-url }}"]'
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor: You may want to pull this one into an env var too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, done.

@edoardopirovano
Copy link
Contributor Author

There's actually already a nightly release up from the workflow's testing, but the PR check is failing because https://github.com/github/semmle-code/pull/39627 isn't merged yet I think. We'll have to wait for the next nightly build after that's merged before this can go in 🙂

@aeisenberg
Copy link
Contributor

I'm a little bit confused. This looks like it only runs the init action with the nightly CLI. Should we be running analyze as well?

@edoardopirovano
Copy link
Contributor Author

I'm a little bit confused. This looks like it only runs the init action with the nightly CLI. Should we be running analyze as well?

The way these tests are setup is a little weird. We use the init action because it gets the CodeQL CLI and puts it on disk so we can print out the versions that we are going to be running with in the later step. Then, these all get put in the VERSIONS_JSON matrix and all the later tests are run with all the versions in there. I'm not a huge fan of this structure, but it didn't seem necessary to change it.

@edoardopirovano edoardopirovano merged commit 24ef87c into github:main Jun 28, 2021
@github-actions github-actions bot mentioned this pull request Jul 5, 2021
5 tasks
@github-actions github-actions bot mentioned this pull request Jul 12, 2021
5 tasks
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