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 practical node tests (lodash...) #5

Merged
merged 3 commits into from
May 5, 2021
Merged

Add practical node tests (lodash...) #5

merged 3 commits into from
May 5, 2021

Conversation

evrardjp
Copy link
Contributor

No description provided.

@evrardjp
Copy link
Contributor Author

This seems broken on my system, the image doesn't seem to have git.

@evrardjp
Copy link
Contributor Author

evrardjp commented May 4, 2021

Retriggered testing, as the containers have changed now

@evrardjp evrardjp changed the title Add lodash testing Add practical node tests (lodash...) May 4, 2021
@evrardjp
Copy link
Contributor Author

evrardjp commented May 4, 2021

Rebased with latest poetry merges.

@dcermak dcermak force-pushed the test-lodash branch 5 times, most recently from 069668f to 4e78da2 Compare May 4, 2021 15:52
@dcermak dcermak force-pushed the test-lodash branch 3 times, most recently from 28c568f to 4c8a8ec Compare May 5, 2021 09:27
@dcermak
Copy link
Collaborator

dcermak commented May 5, 2021

@evrardjp Would you take a look at what I've done to your node tests (unfortunately I cannot request a review from you, as you submitted the PR)? The CI should be passing now 🤞.

@dcermak dcermak force-pushed the test-lodash branch 2 times, most recently from e50dbf6 to 12eb242 Compare May 5, 2021 11:18
test_node.py Outdated
NpmPackageTest(
repository_url="https://github.com/expressjs/express.git",
build_command="""npm config set shrinkwrap false &&
npm rm --silent --save-dev connect-redis &&
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok the only thing I find to say is that those lines are ugly, and would be better if they were all indented 4 spaces below build_command.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Now better?

test_node.py Show resolved Hide resolved
test_node.py Outdated
repository_url="https://github.com/jprichardson/node-fs-extra",
build_command="npm install && npm run unit",
),
pytest.mark.xfail(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

nit: I can't shake why I would do it, but I would pass the marks as kwargs of NpmPackageTest, and just do a single list comprehension for all the tests [ pkg.to_pytest_param(marks=self.marks) for pkg in (NpmPackageTest(build_command=, repository_url=, marks= marks being only set on L103+ . WDYT? Will it be more readable for non pythonistas?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, originally I wanted to treat NpmPackageTest as a pure data container, but now that it also contains some "business logic", I think adding the mark there makes sense as well.

@dcermak
Copy link
Collaborator

dcermak commented May 5, 2021

For some reason the react.js tests are failing on github actions but not locally for me (at least not when I run them serially). I guess that the react tests are too fat and fail if you overload the host. So either we don't run them in parallel, or we just drop them from the test matrix. I'm actually more inclined to dropping react, as it will make the test matrix really huge.

@evrardjp
Copy link
Contributor Author

evrardjp commented May 5, 2021

Well, github actions isn't using tox --parallel, it's only doing tox -e node. However, tox -e node is running the test_node.py tests in parallel, which might be the cause of conflict when multiple of those scripts run on the same machine. Maybe we can change the scope of the fixture to move to a function one, but it will be by far less efficient.

I am fine with dropping react, but we'll have to think about those cases in the future.

@dcermak
Copy link
Collaborator

dcermak commented May 5, 2021

I've opted to skip the react tests for now until we figure out how we can run certain tests serially and others in parallel.

@evrardjp evrardjp merged commit bc4ebf8 into main May 5, 2021
@delete-merged-branch delete-merged-branch bot deleted the test-lodash branch May 5, 2021 17:35
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.

None yet

2 participants