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

gha: implement caching #145

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
tool-cache: false
large-packages: false
docker-images: false

- name: Install vLLM build deps
run: |
sudo apt update
Expand All @@ -58,18 +59,34 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.pyv }}
cache: pip
cache-dependency-path: pyproject.toml

- name: Upgrade pip and nox
run: |
python -m pip install --upgrade pip nox
pip --version
nox --version

- name: Cache nox lint env
id: cache-lint
uses: actions/cache@v4
with:
path: .nox/lint-${{ matrix.pyv }}
key: ${{ runner.os }}-lint-${{ matrix.pyv }}-${{ hashFiles('noxfile.py') }}

- name: Lint code and check dependencies
run: nox -v -s lint-${{ matrix.pyv }}
run: nox --reuse-venv=yes -v -s lint-${{ matrix.pyv }}

- name: Cache nox tests env
id: cache-tests
uses: actions/cache@v4
with:
path: .nox/tests-${{ matrix.pyv }}
key: ${{ runner.os }}-tests-${{ matrix.pyv }}-${{ matrix.vllm_version }}-${{ hashFiles('noxfile.py') }}

- name: Run tests
run: nox -v -s tests-${{ matrix.pyv }} -- --cov-report=xml
run: nox --reuse-venv=yes -v -s tests-${{ matrix.pyv }} -- --cov-report=xml
env:
VLLM_VERSION_OVERRIDE: ${{ matrix.vllm_version }}

Expand All @@ -81,5 +98,12 @@ jobs:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Cache nox build env
id: cache-build
uses: actions/cache@v4
with:
path: .nox/build-${{ matrix.pyv }}
key: ${{ runner.os }}-build-${{ matrix.pyv }}-${{ hashFiles('noxfile.py') }}

- name: Build package
run: nox -s build-${{ matrix.pyv }}
run: nox --reuse-venv=yes -s build-${{ matrix.pyv }}