fix: deep_import on a repository loading #249
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: "CI" | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
Lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/[email protected] | |
with: | |
python-version: 3.9 | |
- name: Linting | |
run: | | |
pip install pre-commit | |
pre-commit run --all-files | |
Tests: | |
needs: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/[email protected] | |
with: | |
python-version: "3.9" | |
- name: Install poetry | |
shell: bash | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1 | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Configure poetry | |
shell: bash | |
run: poetry config virtualenvs.in-project true | |
- name: Set up cache | |
uses: actions/[email protected] | |
id: cache | |
with: | |
path: | | |
.venv | |
~/.cache | |
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Ensure cache is healthy | |
if: steps.cache.outputs.cache-hit == 'true' | |
shell: bash | |
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv | |
- name: Install dependencies | |
shell: bash | |
run: poetry install | |
- name: Pytest run | |
shell: bash | |
run: poetry run pytest --cov=stacklet_cli -v tests |