Prepare 2.8.0 #408
Workflow file for this run
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: CI-Braincube-Connector | |
| on: [push] | |
| env: | |
| python_version: '3.10' | |
| jobs: | |
| setup: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v3 | |
| - name: Set up python | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ env.python_version }} | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| .venv | |
| key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install Poetry | |
| uses: snok/[email protected] | |
| with: | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| - name: Install dependencies | |
| if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
| run: poetry install | |
| mypy: | |
| runs-on: ubuntu-latest | |
| needs: [setup] | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v3 | |
| - name: Set up python | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ env.python_version }} | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| .venv | |
| key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install Poetry | |
| uses: snok/[email protected] | |
| with: | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| - name: run mypy | |
| run: | | |
| poetry run mypy --ignore-missing-imports braincube_connector | |
| black: | |
| runs-on: ubuntu-latest | |
| needs: [setup] | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v3 | |
| - name: Set up python | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ env.python_version }} | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| .venv | |
| key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install Poetry | |
| uses: snok/[email protected] | |
| with: | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| - name: run black | |
| run: | | |
| poetry run black --check --diff . | |
| lint : | |
| runs-on: ubuntu-latest | |
| needs: [setup] | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v3 | |
| - name: Set up python | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ env.python_version }} | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| .venv | |
| key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install Poetry | |
| uses: snok/[email protected] | |
| with: | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| - name: run lint | |
| run: | | |
| poetry run flake8 braincube_connector | |
| unittest : | |
| runs-on: ubuntu-latest | |
| needs: [setup] | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v3 | |
| - name: Set up python | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ env.python_version }} | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| .venv | |
| key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install Poetry | |
| uses: snok/[email protected] | |
| with: | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| - name: run unittest | |
| run: | | |
| poetry run coverage run --source=braincube_connector -m pytest tests/* | |
| poetry run coverage report | |
| if [ "$CI_COMMIT_REF_NAME" == "master" ]; then poetry run coverage html; fi | |
| integration_tests: | |
| runs-on: ubuntu-latest | |
| needs: [setup] | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v3 | |
| - name: Set up python | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ env.python_version }} | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| .venv | |
| key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install Poetry | |
| uses: snok/[email protected] | |
| with: | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| - name: run integration_tests | |
| run: | | |
| poetry run pytest tests_integration/*.py |