diff --git a/.harness/input-set-default.yml b/.harness/input-set-default.yml new file mode 100644 index 00000000..d94e1d8b --- /dev/null +++ b/.harness/input-set-default.yml @@ -0,0 +1,14 @@ +inputSet: + name: Git Input Set + identifier: Git_Input_Set + orgIdentifier: default + projectIdentifier: default_project + pipeline: + identifier: Git_Controlled_Pipeline + properties: + ci: + codebase: + build: + type: branch + spec: + branch: <+trigger.branch> diff --git a/.harness/pipelines.yml b/.harness/pipelines.yml new file mode 100644 index 00000000..863a6b03 --- /dev/null +++ b/.harness/pipelines.yml @@ -0,0 +1,48 @@ +pipeline: + name: Git Controlled Pipeline + identifier: Git_Controlled_Pipeline + projectIdentifier: default_project + orgIdentifier: default + tags: {} + properties: + ci: + codebase: + connectorRef: GitHub_Connector + repoName: example-python + build: <+input> + stages: + - stage: + name: Test + identifier: build + description: "" + type: CI + spec: + cloneCodebase: true + caching: + enabled: true + override: true + paths: [] + buildIntelligence: + enabled: true + platform: + os: Linux + arch: Amd64 + runtime: + type: Cloud + spec: {} + execution: + steps: + - step: + type: Run + name: Run flow + identifier: Run_1 + spec: + shell: Sh + command: |- + echo "Using remote config version" + python3 -m pip install --upgrade "pip==26.1" + python3 -m pip install -r requirements.txt + python3 -m pip install -v git+https://github.com/codecov/codecov-cli.git@cy/harness_ci#subdirectory=codecov-cli + pytest --cov app --junitxml=junit.xml -o junit_family=legacy + codecov-cli --verbose upload-process --fail-on-error -t f7dfc3ad-4fa8-4e62-ab9f-4a33e2894f46 + description: Install requirements, install codecov-cli from branch, run tests, then upload diff --git a/app/calculator.py b/app/calculator.py index 4f380e8e..bc32c7e2 100644 --- a/app/calculator.py +++ b/app/calculator.py @@ -14,3 +14,5 @@ def divide(x, y): return 'Cannot divide by 0' return x * 1.0 / y + def test(): + return 'sample change' \ No newline at end of file