Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions tests/test_bake_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

import subprocess
import sys
import os
from pathlib import Path
import datetime, time

from pytest_cookies.plugin import Cookies, Result
import pytest
Expand Down Expand Up @@ -34,6 +36,7 @@ def baked_project(cookies: Cookies, request) -> Result:
extra_context={
"project_slug": "DummyProject",
"project_name": "dummy-project",
"author_email": "[email protected]",
"default_docker_registry": "test.test.com",
"docker_base": request.param,
}
Expand All @@ -43,17 +46,27 @@ def baked_project(cookies: Cookies, request) -> Result:
assert result.exit_code == 0
return result


@pytest.mark.parametrize(
"commands_on_baked_project",
(
"ls -la .; make help",
# "ls -la .; make help",
# TODO: cannot use `source` to activate venvs ... not sure how to proceed here. Suggestions?
## "make devenv; source .venv/bin/activate && make build info-build test",
# No need whatsoever, venv only needed for cookiecutter - once it is build, can use "make build" directly
"make build",
),
)
def test_make_workflows(baked_project: Result, commands_on_baked_project: str):
working_dir = baked_project.project_path
subprocess.run(
["/bin/bash", "-c", commands_on_baked_project], cwd=working_dir, check=True
results = subprocess.run(
["/bin/bash", "-c", commands_on_baked_project], cwd=working_dir,
# check=True,
capture_output=True,
)

if results.returncode != 0:
current_time = datetime.datetime.now().strftime("%Y%m%d.%H%M%S%d"); time.sleep(1) # make sure not two test w same name
output_std_dir = current_dir.parent / "tmp" / "stderr"
os.makedirs(output_std_dir, exist_ok=True)
with open(output_std_dir / f"stderr_{current_time}.txt", "w+") as f:
print(results.stderr.decode(), file=f)
raise RuntimeError("Subprocess did not run correctly")

This file was deleted.

24 changes: 24 additions & 0 deletions {{cookiecutter.project_slug}}/.github/workflows/check-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build and check image

on: [push, pull_request]

jobs:
verify-image-build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo content
uses: actions/checkout@v2
- name: ooil version
uses: docker://itisfoundation/ci-service-integration-library:v1.0.4
with:
args: ooil --version
- name: Assemble docker compose spec
uses: docker://itisfoundation/ci-service-integration-library:v1.0.4
with:
args: ooil compose
- name: Build all images if multiple
uses: docker://itisfoundation/ci-service-integration-library:v1.0.4
with:
args: docker compose build
- name: test
run: make tests
68 changes: 0 additions & 68 deletions {{cookiecutter.project_slug}}/.osparc/Makefile

This file was deleted.

67 changes: 0 additions & 67 deletions {{cookiecutter.project_slug}}/.osparc/bin/activate

This file was deleted.

40 changes: 0 additions & 40 deletions {{cookiecutter.project_slug}}/.osparc/bin/ooil

This file was deleted.

17 changes: 0 additions & 17 deletions {{cookiecutter.project_slug}}/.osparc/bin/yq

This file was deleted.

5 changes: 2 additions & 3 deletions {{cookiecutter.project_slug}}/.osparc/metadata.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: {{ cookiecutter.project_name }}
key: simcore/services/{%- if cookiecutter.project_type == "computational" -%}comp{%- elif cookiecutter.project_type == "dynamic" -%}dynamic{%- endif -%}/{{ cookiecutter.project_name.lower().replace(' ', '-') }}
type: {{ cookiecutter.project_type }}
integration-version: 1.0.0
integration-version: 2.0.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this value has to do with the ospar integration-version. It is defined on the osparc side.It defines how the catalog integrates this service. You cannot randomly change to another value!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Based on the other cookiecutter which I was using as template for the update (see my comment), that was 2.0.0, that is why I changed it. @GitHK please could you help here?

version: {{ cookiecutter.version }}
version_display: {{ cookiecutter.version_display }}
description: {{ cookiecutter.project_short_description }}
contact: {{ cookiecutter.contact_email }}
contact: {{ cookiecutter.author_email }}
thumbnail: https://github.com/ITISFoundation/osparc-assets/blob/cb43207b6be2f4311c93cd963538d5718b41a023/assets/default-thumbnail-cookiecutter-osparc-service.png?raw=true
authors:
- name: {{ cookiecutter.author_name }}
Expand Down
Loading
Loading