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 fawltydeps against itself in CI #348

Merged
merged 7 commits into from
Aug 10, 2023
Merged

Run fawltydeps against itself in CI #348

merged 7 commits into from
Aug 10, 2023

Conversation

zz1874
Copy link
Collaborator

@zz1874 zz1874 commented Aug 7, 2023

Closed #123

This PR adds a functionality of running fawltydeps against itself in the GitHub Actions CI.
While running fawltydeps, it reads in the python environment from ~/.cache/pypoetry/virtualenvs and ignores format related dependencies (black, codespell, colorama, hypothesis, mypy, nox, pylint, pytest, and types-setuptools).

Also, this PR declares setuptools as a dependency since pkg_resources has been imported to the main code.

Copy link
Member

@jherland jherland left a comment

Choose a reason for hiding this comment

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

Thanks for looking into this. I like the direction of these changes, and they get the job done. 👍🏻

There's one comment below, that I'd like you to reconsider before we merge this.

Another thing to think about (either in this PR or a future PR) is to not only run this FawltyDeps self-check in GitHub CI, but also make it available in our dev shell as a Nox action. This involves adding a new self_test function to noxfile.py, and changing .github/workflows/tests.yaml to instead:

run: poetry run nox --no-venv --no-install --non-interactive -s self_test -- -vv

The advantage of this (and the reason we've done this for the other CI actions) is to make it easy to run the CI actions locally. This helps make CI failures less common (since we can run the same tests locally before we push) and it also make CI failures easier to debug (because we can easily run the same command localy: nox -s self_test).

.github/workflows/tests.yaml Outdated Show resolved Hide resolved
@zz1874
Copy link
Collaborator Author

zz1874 commented Aug 8, 2023

Thanks for the review @jherland !
Totally agree that turning the CI check into a nox action is a smart move, as we can test it out on our own machines. So, I've gone ahead and made that change, and now the CI check runs smoothly using the new self_test function. Your input was awesome!

@zz1874 zz1874 requested a review from jherland August 8, 2023 13:54
Copy link
Member

@jherland jherland left a comment

Choose a reason for hiding this comment

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

Great! Only one thing remaining, that I only realized while reading this latest version, so please don't feel bad for not catching it! 😅

noxfile.py Outdated Show resolved Hide resolved
zz1874 and others added 2 commits August 9, 2023 17:49
@zz1874 zz1874 merged commit 3f0f9b3 into tweag:main Aug 10, 2023
12 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.

Dog-food FawltyDeps in the CI
2 participants