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

Improve GitHub actions duration #309

Merged

Conversation

Neylix
Copy link
Member

@Neylix Neylix commented May 9, 2022

Description

Improve caching datas in Github Actions to reduce test time, add MIX_ENV=test to compile code once (previously code was compiled two times), update some test files to not set the state name to avoid test error (state already started).

Fixes #302

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Runned Github actions on a test branch, the result is a test time 3x faster :
Before :
image
After :
image

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@Neylix Neylix added the testing Improve testing label May 9, 2022
@Neylix Neylix requested review from a user and imnik11 May 9, 2022 12:20
@ghost
Copy link

ghost commented May 9, 2022

Good, I think we can improve it by caching the _build to avoid the recompilation of everything for each job run

@ghost
Copy link

ghost commented May 9, 2022

Good, I think we can improve it by caching the _build to avoid the recompilation of everything for each job run

Something like this maybe:

  - name: Restore build cache
        uses: actions/cache@v2
        with:
          path: _build
          key: ${{ runner.os }}-build-${{ hashFiles('mix.lock') }}-myapp
          restore-keys: ${{ runner.os }}-build-myapp
          ```

@Neylix
Copy link
Member Author

Neylix commented May 9, 2022

Exact ! It reduces the time by 1 min !

@ghost ghost merged commit 603c541 into archethic-foundation:develop May 9, 2022
@Neylix Neylix deleted the Improve-Github-Actions-duration branch May 10, 2022 07:17
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Improve testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant