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

Add CI and make tests externally runnable #7

Merged
merged 10 commits into from
Jun 21, 2024
Merged

Add CI and make tests externally runnable #7

merged 10 commits into from
Jun 21, 2024

Conversation

EvanBoyle
Copy link
Member

@EvanBoyle EvanBoyle commented Jun 21, 2024

Fixes #1

  • refactor tests so they use a cortex client configured in a single place
  • run tests in prod by default
  • read environment variables for org and access token so external users can run tests (plus docs in the readme)
  • add test test:fast and test:ci targets
  • add :dev and :prod targets - these are for us only, and external contributors won't be able to run these scripts, but want to maintain them for convenience

Note: had to disable the list content tests due to some bugs that I found in the API. I believe we're following up on that tomorrow.


declare global {
// eslint-disable-next-line no-var
var testClient: CortexClient;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not import this where needed? This will pollute the global scope for non-test code as well.

Copy link
Contributor

@jmoseley jmoseley left a comment

Choose a reason for hiding this comment

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

One comment about global scope, LGTM o/w.

@EvanBoyle
Copy link
Member Author

@jmoseley will follow up in another PR doing this via an import. Want to lock in CI now before we start making more changes to the SDK today. But agree this is a good point and I will update accordingly

@EvanBoyle EvanBoyle merged commit a3eec56 into main Jun 21, 2024
3 checks passed
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.

make sure that anyone can run tests
2 participants