release: 0.20.1 #656
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test-cp38 | |
on: | |
pull_request: | |
branches: ["**"] | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Checkout examples repo | |
uses: actions/checkout@v3 | |
with: | |
repository: leptonai/examples | |
path: examples | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
cache: "pip" # caching pip dependencies | |
- name: Install dependencies | |
run: | | |
pip install -U pip setuptools | |
- name: Test with pytest | |
run: | | |
if ! hash nvidia-smi 2>/dev/null; then | |
echo "nvidia-smi not found on host, installing cpu version of torch" | |
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu | |
fi | |
pip install . | |
echo "leptonai package version:" | |
lep -v | |
lep ph create -n gpt2 -m hf:gpt2 | |
pip install .[runtime] .[test] | |
cd .. | |
pytest -x leptonai | |
cd - |