Skip to content

build(deps): bump actions/cache from 4.1.0 to 4.1.1 #613

build(deps): bump actions/cache from 4.1.0 to 4.1.1

build(deps): bump actions/cache from 4.1.0 to 4.1.1 #613

Workflow file for this run

# SPDX-License-Identifier: Apache-2.0
name: Test
on:
workflow_dispatch:
push:
branches:
- "main"
- "release-**"
paths:
- '**.py'
- 'pyproject.toml'
- 'requirements*.txt'
- 'tox.ini'
- '.github/workflows/test.yml' # This workflow
pull_request:
branches:
- "main"
- "release-**"
paths:
- '**.py'
- 'pyproject.toml'
- 'requirements*.txt'
- 'tox.ini'
- '.github/workflows/test.yml' # This workflow
env:
LC_ALL: en_US.UTF-8
defaults:
run:
shell: bash
permissions:
contents: read
jobs:
test:
name: "${{ matrix.python }} on ${{ matrix.platform }}"
runs-on: "${{ matrix.platform }}"
strategy:
matrix:
python:
- "3.10"
- "3.11"
platform:
- "ubuntu-latest"
include:
- python: "3.11"
platform: "macos-latest"
steps:
- name: "Harden Runner"
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
# https://github.com/actions/checkout/issues/249
fetch-depth: 0
- name: Free disk space
if: matrix.platform != 'macos-latest'
uses: ./.github/actions/free-disk-space
- name: Install the expect package
if: startsWith(matrix.platform, 'ubuntu')
run: |
sudo apt-get install -y expect
- name: Install tools on MacOS
if: startsWith(matrix.platform, 'macos')
run: |
brew install expect coreutils bash
- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: ${{ matrix.python }}
cache: pip
cache-dependency-path: |
**/pyproject.toml
**/requirements*.txt
- name: Remove llama-cpp-python from cache
run: |
pip cache remove llama_cpp_python
- name: Cache huggingface
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
with:
path: ~/.cache/huggingface
# config contains DEFAULT_MODEL
key: huggingface-${{ hashFiles('src/instructlab/configuration.py') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh>=1.2
- name: Run unit tests with tox
run: |
tox
- name: Remove llama-cpp-python from cache
if: always()
run: |
pip cache remove llama_cpp_python
test-workflow-complete:
needs: ["test"]
runs-on: ubuntu-latest
steps:
- name: Test Workflow Complete
run: echo "Test Workflow Complete"