ape icon indicating copy to clipboard operation
ape copied to clipboard

chore: stop duplicate CI runs on branches

Open fubuloubu opened this issue 3 years ago • 5 comments

What I did

Stop running CI twice

fubuloubu avatar Aug 19 '22 00:08 fubuloubu

I think the tests may not be running

antazoey avatar Aug 19 '22 13:08 antazoey

I'm trying it on hardhat now: https://github.com/ApeWorX/ape-hardhat/pull/92/files

antazoey avatar Aug 19 '22 21:08 antazoey

I don't think this will work, the logic seems off.

However, I think we can do this:

  push:
    branches:
      - 'main'

and now it will only run on pushes to main instead of pushing to branches

Edit: this goes in the on section at the top. You can make it an object rather than a list of strings

The idea behind not restricting other branches is that in a fork, someone can just enable github actions (and add their secrets) and it should function there too, for heavier development

fubuloubu avatar Aug 20 '22 14:08 fubuloubu

LGTM

to translate, actions will run either if it's a PR (no matter if from fork or not) or if it is a push to a fork.

Thus, a push to ApeWorX/ape won't trigger unless it's on a PR Thus, there are no more duplicate CI runs on branches pushed to ApeWorX/ape.

Yeah, still not quite perfect (would prefer branches to run if and only if they are not in an active PR), but this is the best I can do.

I also am not a huge fan of how they say "ignored"

fubuloubu avatar Sep 02 '22 21:09 fubuloubu

Also appears that linting, type checking, and fuzzing didn't trigger...

EDIT: nevermind, they did run and pass, just on mobile it doesn't appear like they ran

fubuloubu avatar Sep 02 '22 21:09 fubuloubu

See https://github.com/ApeWorX/ape/pull/1171, including the stackoverflow link

antazoey avatar Dec 01 '22 01:12 antazoey