This repository has been archived by the owner on May 10, 2024. It is now read-only.
fix resource api to match skypilot 0.4.1 #57
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: Python Tests | |
on: | |
# Trigger the workflow on push or pull request, | |
# but only for the main branch | |
push: | |
branches: | |
- main | |
- 'releases/**' | |
pull_request: | |
branches: | |
- main | |
- 'releases/**' | |
jobs: | |
python-test: | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
test-path: | |
- tests/test_cli.py::test_hf_serve | |
- tests/test_launch.py | |
- tests/test_runtracker.py | |
- tests/test_serve.py | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
sudo apt-get install -y openssh-client | |
python -m pip install --upgrade pip | |
pip install pytest pytest-xdist pytest-env>=0.6 | |
pip install "skypilot[aws] @ git+https://github.com/skypilot-org/skypilot.git" | |
pip install boto3 | |
pip install -e . | |
- name: Run tests | |
env: | |
AWS_CREDENTIALS: ${{ secrets.AWS_CREDENTIALS }} | |
run: | | |
mkdir -p "/home/runner/.aws" | |
mkdir -p "/home/runner/.ssh" | |
echo "$AWS_CREDENTIALS" > /home/runner/.aws/credentials | |
pytest -n 1 ${{ matrix.test-path }} | |
- name: Upload logs | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: error-log | |
path: | | |
/tmp/serve_huggingface-*.log | |
/tmp/serve_llmatc-*.log | |
/home/runner/sky_logs/sky-*/*.log |