Skip to content

Conversation

robertbrignull
Copy link
Contributor

@robertbrignull robertbrignull commented May 5, 2020

The external queries tests run in a fixed directory. This is arguably fine when run as part of CI, but if the tests are run multiple times locally then they start to interfere with each other.

To see it's working, you can see in the test logs

Cloning into '/tmp/codeql-action-1XUxpg/github/codeql-go'

This PR creates a random tmp dir for each test run and deletes it when the test is done. I created a shared function for this because I intend to start using it for other tests as well.

Also by populating the RUNNER_WORKSPACE env var we can make it required in checkoutExternalQueries and this avoids the hardcoded alternative path.

@Daverlo

Merge / deployment checklist

@robertbrignull
Copy link
Contributor Author

Tested with a repo that uses external queries.

@robertbrignull robertbrignull merged commit 538cbdd into master May 11, 2020
@robertbrignull robertbrignull deleted the external_queries_tmp_dir branch May 11, 2020 15:08
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.

2 participants