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

Use Github Action Caching to Speed Up Unit and Integration Tests #2015

Closed
gsheni opened this issue May 16, 2024 · 1 comment
Closed

Use Github Action Caching to Speed Up Unit and Integration Tests #2015

gsheni opened this issue May 16, 2024 · 1 comment
Assignees
Labels
feature request Request for a new feature

Comments

@gsheni
Copy link
Contributor

gsheni commented May 16, 2024

Problem Description

  • Our unit, integration, and minimum tests currently take a long time to complete.
    • Longest integration test - 16m 22s (3.12, windows-latest)
    • Longest unit test - 8m 31s (3.10, windows-latest)
    • Longest minimum test - 17m 10s (3.11, windows-latest)

Expected behavior

  • We can cache our python dependencies to speed up our workflow.
  • Specifically, we can cache for integration, unit, minimum, and lint workflows.
  • The change would look something like this:
      - uses: actions/checkout@v4
      - name: Set up python ${{ matrix.python-version }}
        uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.python-version }}
          cache: 'pip'
          cache-dependency-path: "pyproject.toml"
      - uses: actions/cache@v3
        id: cache
        with:
          path: ${{ env.pythonLocation }}
          key: py-${{ matrix.python-version }}-tests-${{ hashFiles('pyproject.toml') }}-v02
      - name: Install all deps (if cache has changed)
        if: (steps.cache.outputs.cache-hit != 'true')
        run: |
          make install-all
      - name: Install all deps (if cache has not changed)
        if: (steps.cache.outputs.cache-hit == 'true')
        run:  |
          python -m pip install --no-dependencies .

Additional context

@gsheni gsheni added feature request Request for a new feature new Automatic label applied to new issues labels May 16, 2024
@npatki npatki removed the new Automatic label applied to new issues label May 20, 2024
@lajohn4747 lajohn4747 self-assigned this Jul 11, 2024
@lajohn4747
Copy link
Contributor

Appears to be minimal gain with caching and we have a limit to how much we can cache for tests. Closing without merging since the investigation results do not warrant the addition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests

3 participants