-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
feat: Skip running tests if there are no source code changes [APE-1094] #1602
feat: Skip running tests if there are no source code changes [APE-1094] #1602
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some feedback but it seems like we need 2 PRs here
src/ape/api/accounts.py
Outdated
@@ -215,6 +221,11 @@ def deploy( | |||
:class:`~ape.contracts.ContractInstance`: An instance of the deployed contract. | |||
""" | |||
txn = contract(*args, **kwargs) | |||
if kwargs.get("value") and not contract.contract_type.constructor.is_payable: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you may want to put this change on a separate branch
.github/workflows/test.yaml
Outdated
- name: Run flake8 | ||
if: steps.detect-changes.outputs.files_changed == 'true' | ||
run: flake8 . | ||
- name: Run mdformat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mdformat can always run, that is probably easier.
because even if you change the README or this file (test.yaml), mdformat may have something to do
.github/workflows/test.yaml
Outdated
- name: Run mdformat | ||
if: steps.detect-changes.outputs.files_changed == 'true' | ||
run: mdformat . --check | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file needs linting
.github/workflows/test.yaml
Outdated
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install changed-files action | ||
run: npm install umani/changed-files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a python version of this tool? That would fit better and not require installing npm
.github/workflows/test.yaml
Outdated
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uses: actions/setup-python@v2 | |
uses: actions/setup-python@v4 |
.github/workflows/test.yaml
Outdated
if: steps.detect-changes.outputs.files_changed == 'true' | ||
run: mypy . | ||
|
||
functional: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we skip this whole section if there are no changes? Like there isn't a need to install Go or Geth if there are no changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some feedback but it seems like we need 2 PRs here
the branchI created is out of date. I will fix it |
What I did
I tried to follow this guide https://github.com/umani/changed-files#readme. Test skipping was successful on my fork. But I wouldn't consider merging this PR just not yet. I'm no workflow expert. Hoping someone will eventually look at this PR & improve it.
fixes: #1488
How I did it
How to verify it
Checklist