Add trainloop upgrade command #46
This file contains hidden or 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: CLI Tests | |
| # Fast CLI tests that run on every PR and push to main | |
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| paths: | |
| - "cli/**" | |
| - "tests/**" | |
| - ".github/workflows/cli-tests.yml" | |
| push: | |
| branches: | |
| - "release/**" | |
| paths: | |
| - "cli/**" | |
| - "tests/**" | |
| - ".github/workflows/cli-tests.yml" | |
| workflow_dispatch: | |
| jobs: | |
| test-cli: | |
| name: CLI Integration Tests | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: cli | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| version: latest | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| - name: Cache Poetry dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: cli/.venv | |
| key: venv-${{ runner.os }}-cli-python-3.11-${{ hashFiles('cli/poetry.lock') }} | |
| restore-keys: | | |
| venv-${{ runner.os }}-cli-python-3.11- | |
| venv-${{ runner.os }}-cli- | |
| - name: Install dependencies | |
| run: poetry install --no-interaction | |
| - name: Run linting | |
| run: | | |
| poetry run black --check . | |
| poetry run flake8 . | |
| continue-on-error: true | |
| - name: Run CLI FSSpec integration tests | |
| run: poetry run pytest ../tests/unit/test_fsspec_integration.py -v | |
| - name: Run CLI init command tests | |
| run: poetry run pytest ../tests/integration/init_flow/test_init_command.py -v |