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

Cache Maven dependencies in CI workflow #73

Closed
Tracked by #16
tisonkun opened this issue Apr 16, 2023 · 0 comments · Fixed by #75
Closed
Tracked by #16

Cache Maven dependencies in CI workflow #73

tisonkun opened this issue Apr 16, 2023 · 0 comments · Fixed by #75
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@tisonkun
Copy link
Member

tisonkun commented Apr 16, 2023

Currently, unit tests on macOS consume over 20 minutes, which is relatively long for me. It seems the dependencies download step consumes the major time. Thus, we can improve the case by caching maven depedencies.

Related to -

- uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Maven verify
run: ./mvnw clean verify

Ref impl -

      - name: Cache local Maven repository
        uses: actions/cache@v3
        timeout-minutes: 5
        with:
          path: |
            ~/.m2/repository/*/*/*
            !~/.m2/repository/org/apache/pulsar
          key: ${{ runner.os }}-m2-dependencies-core-modules-${{ hashFiles('**/pom.xml') }}
          restore-keys: |
            ${{ runner.os }}-m2-dependencies-core-modules-
@tisonkun tisonkun mentioned this issue Apr 16, 2023
20 tasks
@tisonkun tisonkun added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Apr 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant