Skip to content

test workflow (#19) #36

test workflow (#19)

test workflow (#19) #36

Workflow file for this run

name: Eureka Tests
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
steps:
- name: Restore cached hf_home
uses: actions/cache/restore@v4
with:
path: ~/hf_home
key: hf_home
- name: Restore cached virtualenv
uses: actions/cache/restore@v4
with:
key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}
path: ~/.venv
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
cache: 'pip'
- name: Install dependencies
run: |
python -m venv ~/.venv
source ~/.venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
pip install .
python -m nltk.downloader punkt
- name: Save cache virtualenv
uses: actions/cache/save@v4
with:
key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}
path: ~/.venv
- name: Run linters
continue-on-error: true
run: |
source ~/.venv/bin/activate
make linters
- name: Run tests
run: |
source ~/.venv/bin/activate
export HF_HOME="~/hf_home"
echo "$HF_HOME"
mkdir -p "$HF_HOME"
pip show eureka_ml_insights
export skip_tests_with_auth=1
pwd
make test
- name: Save hf_home
uses: actions/cache/save@v4
with:
key: hf_home
path: ~/hf_home