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

feat: Skip running tests if there are no source code changes [APE-1094] #1602

Closed
wants to merge 0 commits into from
Closed

feat: Skip running tests if there are no source code changes [APE-1094] #1602

wants to merge 0 commits into from

Conversation

Aviksaikat
Copy link
Contributor

@Aviksaikat Aviksaikat commented Aug 13, 2023

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

  • All changes are completed
  • New test cases have been added
  • Documentation has been updated

Copy link
Member

@antazoey antazoey left a 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

@@ -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:
Copy link
Member

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

- name: Run flake8
if: steps.detect-changes.outputs.files_changed == 'true'
run: flake8 .
- name: Run mdformat
Copy link
Member

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

- name: Run mdformat
if: steps.detect-changes.outputs.files_changed == 'true'
run: mdformat . --check

Copy link
Member

Choose a reason for hiding this comment

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

this file needs linting

steps:
- uses: actions/checkout@v3
- name: Install changed-files action
run: npm install umani/changed-files
Copy link
Member

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

- uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v2
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
uses: actions/setup-python@v2
uses: actions/setup-python@v4

if: steps.detect-changes.outputs.files_changed == 'true'
run: mypy .

functional:
Copy link
Member

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

Copy link
Member

@antazoey antazoey left a 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

@Aviksaikat
Copy link
Contributor Author

Aviksaikat commented Aug 22, 2023

the branchI created is out of date. I will fix it

@Aviksaikat Aviksaikat closed this Aug 22, 2023
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.

Skip running tests if there are no source code changes [APE-1094]
2 participants