diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e020b1cbe..6c51b1e24 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,178 +17,178 @@ concurrency: jobs: - # lint: - # name: Linter - # runs-on: ubuntu-latest - # if: | - # (github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]') || - # (github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]') - # timeout-minutes: 5 - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # with: - # ref: ${{ github.event.pull_request.head.sha }} - # - name: Setup Python 3.9 - # uses: actions/setup-python@v2 - # with: - # python-version: 3.9 - # - name: Cache pre-commit hooks - # uses: actions/cache@v2 - # with: - # path: ~/.cache/pre-commit - # key: pre-commit|py3.9|${{ hashFiles('.pre-commit-config.yaml') }} - # - name: Cache PyPI - # uses: actions/cache@v2 - # with: - # key: pip-lint-${{ hashFiles('requirements/*.txt') }} - # path: ~/.cache/pip - # restore-keys: | - # pip-lint- - # - name: Install dependencies - # uses: py-actions/py-dependency-install@v2 - # with: - # path: requirements/ci.txt - # - name: Run linters - # run: | - # make lint - # env: - # CI_LINT_RUN: 1 - # - name: Install spell checker - # run: | - # sudo apt install libenchant-dev - # pip install -r requirements/doc.txt - # - name: Run docs spelling - # run: | - # make api-doc-spelling + lint: + name: Linter + runs-on: ubuntu-latest + if: | + (github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]') || + (github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]') + timeout-minutes: 5 + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Setup Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Cache pre-commit hooks + uses: actions/cache@v2 + with: + path: ~/.cache/pre-commit + key: pre-commit|py3.9|${{ hashFiles('.pre-commit-config.yaml') }} + - name: Cache PyPI + uses: actions/cache@v2 + with: + key: pip-lint-${{ hashFiles('requirements/*.txt') }} + path: ~/.cache/pip + restore-keys: | + pip-lint- + - name: Install dependencies + uses: py-actions/py-dependency-install@v2 + with: + path: requirements/ci.txt + - name: Run linters + run: | + make lint + env: + CI_LINT_RUN: 1 + - name: Install spell checker + run: | + sudo apt install libenchant-dev + pip install -r requirements/doc.txt + - name: Run docs spelling + run: | + make api-doc-spelling - # unit: - # name: Unit - # needs: lint - # strategy: - # matrix: - # python-version: [3.6, 3.7, 3.8, 3.9] - # os: [ubuntu, macos, windows] - # cmd: [sdk, cli] - # exclude: - # - os: macos # temporarily exclude - # - python-version: 3.7 - # os: macos - # - python-version: 3.7 - # os: windows - # - python-version: 3.8 - # os: macos - # - python-version: 3.8 - # os: windows - # fail-fast: false - # runs-on: ${{ matrix.os }}-latest - # timeout-minutes: 15 - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - name: Setup Python ${{ matrix.python-version }} - # uses: actions/setup-python@v2 - # with: - # python-version: ${{ matrix.python-version }} - # - name: Get pip cache dir - # id: pip-cache - # run: | - # echo "::set-output name=dir::$(pip cache dir)" # - name: Cache - # - name: Cache PyPI - # uses: actions/cache@v2 - # with: - # key: pip-ci-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements/*.txt') - # }} - # path: ${{ steps.pip-cache.outputs.dir }} - # restore-keys: | - # pip-ci-${{ runner.os }}-${{ matrix.python-version }}- - # - name: Install dependencies - # uses: py-actions/py-dependency-install@v2 - # with: - # path: requirements/ci.txt - # - name: Run unittests - # env: - # COLOR: yes - # run: | - # make .test-${{ matrix.cmd }} PYTEST_ARGS=-vvv - # - name: Upload coverage artifact - # uses: neuro-inc/prepare-coverage@v21.9.1 - # with: - # key: unit-${{ matrix.python-version }}-${{ matrix.os }}-${{ matrix.cmd }} + unit: + name: Unit + needs: lint + strategy: + matrix: + python-version: [3.6, 3.7, 3.8, 3.9] + os: [ubuntu, macos, windows] + cmd: [sdk, cli] + exclude: + - os: macos # temporarily exclude + - python-version: 3.7 + os: macos + - python-version: 3.7 + os: windows + - python-version: 3.8 + os: macos + - python-version: 3.8 + os: windows + fail-fast: false + runs-on: ${{ matrix.os }}-latest + timeout-minutes: 15 + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" # - name: Cache + - name: Cache PyPI + uses: actions/cache@v2 + with: + key: pip-ci-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements/*.txt') + }} + path: ${{ steps.pip-cache.outputs.dir }} + restore-keys: | + pip-ci-${{ runner.os }}-${{ matrix.python-version }}- + - name: Install dependencies + uses: py-actions/py-dependency-install@v2 + with: + path: requirements/ci.txt + - name: Run unittests + env: + COLOR: yes + run: | + make .test-${{ matrix.cmd }} PYTEST_ARGS=-vvv + - name: Upload coverage artifact + uses: neuro-inc/prepare-coverage@v21.9.1 + with: + key: unit-${{ matrix.python-version }}-${{ matrix.os }}-${{ matrix.cmd }} - # e2e: - # name: E2E - # needs: unit - # strategy: - # matrix: - # python-version: [3.6, 3.7, 3.8, 3.9] - # os: [ubuntu, macos, windows] - # exclude: - # - os: macos # temporarily exclude - # - python-version: 3.7 - # os: macos - # - python-version: 3.7 - # os: windows - # - python-version: 3.8 - # os: macos - # - python-version: 3.8 - # os: windows - # fail-fast: false - # runs-on: ${{ matrix.os }}-latest - # timeout-minutes: 90 - # continue-on-error: true - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - name: Setup Python ${{ matrix.python-version }} - # uses: actions/setup-python@v2 - # with: - # python-version: ${{ matrix.python-version }} - # - name: Get pip cache dir - # id: pip-cache - # run: | - # echo "::set-output name=dir::$(pip cache dir)" # - name: Cache - # - name: Cache PyPI - # uses: actions/cache@v2 - # with: - # key: pip-ci-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements/*.txt') - # }} - # path: ${{ steps.pip-cache.outputs.dir }} - # restore-keys: | - # pip-ci-${{ runner.os }}-${{ matrix.python-version }}- - # - name: Install dependencies - # uses: py-actions/py-dependency-install@v2 - # with: - # path: requirements/ci.txt - # - name: Run E2E tests - # timeout-minutes: 75 - # env: - # E2E_TOKEN: ${{ secrets.E2E_TOKEN }} - # E2E_USER_TOKEN: ${{ secrets.E2E_USER_TOKEN }} - # PYTEST_XDIST_NUM_THREADS: 16 - # COLOR: yes - # run: | - # make .e2e - # - name: Upload coverage artifact - # uses: neuro-inc/prepare-coverage@v21.9.1 - # with: - # key: e2e-${{ matrix.python-version }}-${{ matrix.os }} + e2e: + name: E2E + needs: unit + strategy: + matrix: + python-version: [3.6, 3.7, 3.8, 3.9] + os: [ubuntu, macos, windows] + exclude: + - os: macos # temporarily exclude + - python-version: 3.7 + os: macos + - python-version: 3.7 + os: windows + - python-version: 3.8 + os: macos + - python-version: 3.8 + os: windows + fail-fast: false + runs-on: ${{ matrix.os }}-latest + timeout-minutes: 90 + continue-on-error: true + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" # - name: Cache + - name: Cache PyPI + uses: actions/cache@v2 + with: + key: pip-ci-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements/*.txt') + }} + path: ${{ steps.pip-cache.outputs.dir }} + restore-keys: | + pip-ci-${{ runner.os }}-${{ matrix.python-version }}- + - name: Install dependencies + uses: py-actions/py-dependency-install@v2 + with: + path: requirements/ci.txt + - name: Run E2E tests + timeout-minutes: 75 + env: + E2E_TOKEN: ${{ secrets.E2E_TOKEN }} + E2E_USER_TOKEN: ${{ secrets.E2E_USER_TOKEN }} + PYTEST_XDIST_NUM_THREADS: 16 + COLOR: yes + run: | + make .e2e + - name: Upload coverage artifact + uses: neuro-inc/prepare-coverage@v21.9.1 + with: + key: e2e-${{ matrix.python-version }}-${{ matrix.os }} - # upload-cov: - # name: Upload coverage - # needs: [unit, e2e] - # runs-on: ubuntu-latest - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # with: - # ref: ${{ github.sha }} - # - name: Upload coverage - # uses: neuro-inc/upload-coverage@v21.9.4 + upload-cov: + name: Upload coverage + needs: [unit, e2e] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + ref: ${{ github.sha }} + - name: Upload coverage + uses: neuro-inc/upload-coverage@v21.9.4 deploy: name: Deploy - # needs: e2e + needs: e2e runs-on: ubuntu-latest # Run only on pushing a tag if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') @@ -211,20 +211,20 @@ jobs: run: | cd neuro-cli python setup.py sdist bdist_wheel - # - name: PyPI upload SDK - # env: - # TWINE_USERNAME: __token__ - # TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN_SDK }} - # TWINE_NON_INTERACTIVE: 1 - # run: | - # twine upload neuro-sdk/dist/* - # - name: PyPI upload CLI - # env: - # TWINE_USERNAME: __token__ - # TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN_CLI }} - # TWINE_NON_INTERACTIVE: 1 - # run: | - # twine upload neuro-cli/dist/* + - name: PyPI upload SDK + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN_SDK }} + TWINE_NON_INTERACTIVE: 1 + run: | + twine upload neuro-sdk/dist/* + - name: PyPI upload CLI + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN_CLI }} + TWINE_NON_INTERACTIVE: 1 + run: | + twine upload neuro-cli/dist/* - name: Merge dists for GitHub Release run: | mkdir dist diff --git a/CHANGELOG.md b/CHANGELOG.md index e994bde24..b64821864 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ [comment]: # (towncrier release notes start) -Neuro SDK/CLI 21.9.3a2 (2021-09-24) +Neuro SDK/CLI 21.9.3 (2021-09-24) =================================== Features diff --git a/VERSION.txt b/VERSION.txt index 4c930a582..56448f3f2 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,4 +1,4 @@ # Global version number, # Update the file and run 'make fmt' to apply it everywhere -21.9.3a2 +21.9.3 diff --git a/neuro-cli/setup.py b/neuro-cli/setup.py index ea2f41412..41645ab84 100644 --- a/neuro-cli/setup.py +++ b/neuro-cli/setup.py @@ -6,7 +6,7 @@ setup( name="neuro-cli", - version="21.9.3a2", + version="21.9.3", python_requires=">=3.6.0", # Make sure to pin versions of install_requires install_requires=[ @@ -19,7 +19,7 @@ "python-jose>=3.0.0", "python-dateutil>=2.7.0", "aiodocker>=0.18.7", - "neuro-sdk>=21.9.3a2", + "neuro-sdk>=21.9.3", "click>=8.0", "humanize>=3.3", "typing_extensions>=3.7.4", diff --git a/neuro-cli/src/neuro_cli/__init__.py b/neuro-cli/src/neuro_cli/__init__.py index 777f03201..ec8701ae2 100644 --- a/neuro-cli/src/neuro_cli/__init__.py +++ b/neuro-cli/src/neuro_cli/__init__.py @@ -1 +1 @@ -__version__ = "21.9.3a2" +__version__ = "21.9.3" diff --git a/neuro-sdk/setup.py b/neuro-sdk/setup.py index f7ee2198e..e22f0f8dd 100644 --- a/neuro-sdk/setup.py +++ b/neuro-sdk/setup.py @@ -6,7 +6,7 @@ setup( name="neuro-sdk", - version="21.9.3a2", + version="21.9.3", python_requires=">=3.6.0", # Make sure to pin versions of install_requires install_requires=[ diff --git a/neuro-sdk/src/neuro_sdk/__init__.py b/neuro-sdk/src/neuro_sdk/__init__.py index b352d4b1f..112c21fb3 100644 --- a/neuro-sdk/src/neuro_sdk/__init__.py +++ b/neuro-sdk/src/neuro_sdk/__init__.py @@ -85,7 +85,7 @@ from .users import Action, Permission, Share, Users from .utils import _ContextManager, find_project_root -__version__ = "21.9.3a2" +__version__ = "21.9.3" __all__ = (