aergoio / aergo

aergo blockchain kernel
http://docs.aergo.io
MIT License
214 stars 45 forks source link

Add github actions for unit tests #207

Closed hayarobi closed 1 year ago

hayarobi commented 1 year ago
kroggen commented 1 year ago

When this PR was created, it run 2 different checks. This is not needed. It should run only the main one, made for PRs

kroggen commented 1 year ago

Another option to avoid the duplicate run of actions is to unify the 2 actions into a single one.

First by removing the filter of branches on push on build_and_test.yaml

Then run the steps conditionally:

    - name: Complete Unit Test
      if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'
      run: ...

    - name: Short Unit Test
      if: github.ref != 'refs/heads/master' && github.ref != 'refs/heads/develop'
      run: ...

But I suspect that it will still run the action again when the PR is merged...

If this is the case, then this would be better

kroggen commented 1 year ago

I made a test on another fork and it did not work

You can see the PR here it run the short unit tests instead of the complete tests on the pull request

kroggen commented 1 year ago

If you will no more use the branch, then it can be deleted