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

Speed up tests #1630

Merged
merged 1 commit into from
Feb 28, 2022
Merged

Speed up tests #1630

merged 1 commit into from
Feb 28, 2022

Conversation

cniackz
Copy link
Collaborator

@cniackz cniackz commented Feb 26, 2022

Fixes https://github.com/miniohq/engineering/issues/539

The idea of this PR is to speed up tests by using the cache to share those files that are used in different spots.

The most transcendental part is this:

      - name: Get yarn cache directory path
        id: yarn-cache-dir-path
        run: echo "::set-output name=dir::$(yarn cache dir)"

      - uses: actions/cache@v2
        id: yarn-cache
        with:
          path: |
            ${{ steps.yarn-cache-dir-path.outputs.dir }}
            ./portal-ui/node_modules/
            ./portal-ui/build/
          key: ${{ runner.os }}-yarn-${{ hashFiles('./portal-ui/yarn.lock') }}
          restore-keys: |
            ${{ runner.os }}-yarn-

      - name: Install Dependencies
        if: steps.yarn-cache.outputs.cache-hit != 'true'
        working-directory: ./
        run: make assets

Basically, we put in cache all those files that are needed, so we don't run make assets over and over.

Screen Shot 2022-02-26 at 2 16 32 AM

Where Install Dependencies is skipped

Secondly, we execute lint and no warning tests first and then the rest in order to skip dependant jobs if lint is not passing:

Screen Shot 2022-02-26 at 2 10 26 AM

@harshavardhana harshavardhana merged commit e52fb7d into minio:master Feb 28, 2022
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.

None yet

3 participants