Skip to content

Commit

Permalink
Merge pull request #869 from Green-Software-Foundation/test-ci
Browse files Browse the repository at this point in the history
Test ci
  • Loading branch information
narekhovhannisyan authored Jul 5, 2024
2 parents 6717c9f + 23fa28a commit 219f0d7
Show file tree
Hide file tree
Showing 7 changed files with 414 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nodejs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ jobs:
- name: Run lint
run: npm run lint

- name: Run tests
- name: Run unit tests
run: npm run test --silent
4 changes: 2 additions & 2 deletions .github/workflows/release-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
- name: Run unit tests
run: npm test

- name: Install dependencies
run: npm ci
- name: Run integration tests
run: npm run if-check -- -d manifests/outputs

- name: Initialize git user email
run: git config --global user.email "${{ vars.RELEASE_USER_EMAIL }}"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
- name: Run unit tests
run: npm test

- name: Install dependencies
run: npm ci
- name: Run integration tests
run: npm run if-check -- -d manifests/outputs

- name: Initialize git user email
run: git config --global user.email "${{ env.RELEASE_USER_EMAIL }}"
Expand Down
69 changes: 69 additions & 0 deletions outputs/examples/copy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: copy-param
description: null
tags: null
initialize:
plugins:
copy-param:
path: builtin
method: Copy
global-config:
keep-existing: true
from: original
to: copy
outputs:
- yaml
execution:
command: >-
/Users/admin/.nvm/versions/node/v18.19.0/bin/ts-node
/Users/admin/Projects/uk/if/src/index.ts --manifest
manifests/examples/copy.yaml --output outputs/examples/copy
environment:
if-version: 0.4.0
os: macOS
os-version: 14.3.1
node-version: 18.19.0
date-time: 2024-06-30T07:53:07.361Z (UTC)
dependencies:
- '@babel/[email protected]'
- '@babel/[email protected]'
- '@commitlint/[email protected]'
- '@commitlint/[email protected]'
- '@grnsft/[email protected]'
- '@jest/[email protected]'
- '@types/[email protected]'
- '@types/[email protected]'
- '@types/[email protected]'
- '@types/[email protected]'
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
status: success
tree:
children:
child-1:
pipeline:
- copy-param
inputs:
- timestamp: '2023-12-12T00:00:00.000Z'
original: hello
outputs:
- timestamp: '2023-12-12T00:00:00.000Z'
original: hello
copy: hello
240 changes: 240 additions & 0 deletions outputs/examples/generics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,240 @@
name: generics
description: >-
a pipeline that does arbitrary calculations using our generic arithmetic
builtins
tags: null
initialize:
plugins:
interpolate:
path: builtin
method: Interpolation
global-config:
method: linear
x:
- 0
- 10
- 50
- 100
'y':
- 0.12
- 0.32
- 0.75
- 1.02
input-parameter: cpu/utilization
output-parameter: cpu-factor
cpu-factor-to-wattage:
path: builtin
method: Multiply
global-config:
input-parameters:
- cpu-factor
- cpu/thermal-design-power
output-parameter: cpu-wattage
wattage-times-duration:
path: builtin
method: Multiply
global-config:
input-parameters:
- cpu-wattage
- duration
output-parameter: cpu-wattage-times-duration
wattage-to-energy-kwh:
path: builtin
method: Divide
global-config:
numerator: cpu-wattage-times-duration
denominator: 3600000
output: cpu-energy-raw
calculate-vcpu-ratio:
path: builtin
method: Divide
global-config:
numerator: vcpus-total
denominator: vcpus-allocated
output: vcpu-ratio
correct-cpu-energy-for-vcpu-ratio:
path: builtin
method: Divide
global-config:
numerator: cpu-energy-raw
denominator: vcpu-ratio
output: cpu-energy-kwh
coefficient:
path: builtin
method: Coefficient
global-config:
input-parameter: cpu-energy-kwh
coefficient: 2
output-parameter: energy-doubled
multiply:
path: builtin
method: Multiply
global-config:
input-parameters:
- cpu/utilization
- duration
output-parameter: cpu-times-duration
outputs:
- yaml
execution:
command: >-
/Users/admin/.nvm/versions/node/v18.19.0/bin/ts-node
/Users/admin/Projects/uk/if/src/index.ts --manifest
manifests/examples/generics.yml --output outputs/examples/generics
environment:
if-version: 0.4.0
os: macOS
os-version: 14.3.1
node-version: 18.19.0
date-time: 2024-06-30T07:53:53.523Z (UTC)
dependencies:
- '@babel/[email protected]'
- '@babel/[email protected]'
- '@commitlint/[email protected]'
- '@commitlint/[email protected]'
- '@grnsft/[email protected]'
- '@jest/[email protected]'
- '@types/[email protected]'
- '@types/[email protected]'
- '@types/[email protected]'
- '@types/[email protected]'
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
status: success
tree:
children:
child-1:
pipeline:
- interpolate
- cpu-factor-to-wattage
- wattage-times-duration
- wattage-to-energy-kwh
- calculate-vcpu-ratio
- correct-cpu-energy-for-vcpu-ratio
- coefficient
- multiply
config: null
defaults:
cpu/thermal-design-power: 100
vcpus-allocated: 1
vcpus-total: 8
inputs:
- timestamp: '2023-12-12T00:00:00.000Z'
cloud/instance-type: A1
cloud/region: uk-west
duration: 1
cpu/utilization: 50
network/energy: 10
energy: 5
- timestamp: '2023-12-12T00:00:01.000Z'
duration: 5
cpu/utilization: 20
cloud/instance-type: A1
cloud/region: uk-west
network/energy: 10
energy: 5
- timestamp: '2023-12-12T00:00:06.000Z'
duration: 7
cpu/utilization: 15
cloud/instance-type: A1
cloud/region: uk-west
network/energy: 10
energy: 5
- timestamp: '2023-12-12T00:00:13.000Z'
duration: 30
cloud/instance-type: A1
cloud/region: uk-west
cpu/utilization: 15
network/energy: 10
energy: 5
outputs:
- timestamp: '2023-12-12T00:00:00.000Z'
cloud/instance-type: A1
cloud/region: uk-west
duration: 1
cpu/utilization: 50
network/energy: 10
energy: 5
cpu/thermal-design-power: 100
vcpus-allocated: 1
vcpus-total: 8
cpu-factor: 0.75
cpu-wattage: 75
cpu-wattage-times-duration: 75
cpu-energy-raw: 0.000020833333333333333
vcpu-ratio: 8
cpu-energy-kwh: 0.0000026041666666666666
energy-doubled: 0.000005208333333333333
cpu-times-duration: 50
- timestamp: '2023-12-12T00:00:01.000Z'
duration: 5
cpu/utilization: 20
cloud/instance-type: A1
cloud/region: uk-west
network/energy: 10
energy: 5
cpu/thermal-design-power: 100
vcpus-allocated: 1
vcpus-total: 8
cpu-factor: 0.4275
cpu-wattage: 42.75
cpu-wattage-times-duration: 213.75
cpu-energy-raw: 0.000059375
vcpu-ratio: 8
cpu-energy-kwh: 0.000007421875
energy-doubled: 0.00001484375
cpu-times-duration: 100
- timestamp: '2023-12-12T00:00:06.000Z'
duration: 7
cpu/utilization: 15
cloud/instance-type: A1
cloud/region: uk-west
network/energy: 10
energy: 5
cpu/thermal-design-power: 100
vcpus-allocated: 1
vcpus-total: 8
cpu-factor: 0.37375
cpu-wattage: 37.375
cpu-wattage-times-duration: 261.625
cpu-energy-raw: 0.00007267361111111111
vcpu-ratio: 8
cpu-energy-kwh: 0.000009084201388888889
energy-doubled: 0.000018168402777777778
cpu-times-duration: 105
- timestamp: '2023-12-12T00:00:13.000Z'
duration: 30
cloud/instance-type: A1
cloud/region: uk-west
cpu/utilization: 15
network/energy: 10
energy: 5
cpu/thermal-design-power: 100
vcpus-allocated: 1
vcpus-total: 8
cpu-factor: 0.37375
cpu-wattage: 37.375
cpu-wattage-times-duration: 1121.25
cpu-energy-raw: 0.00031145833333333335
vcpu-ratio: 8
cpu-energy-kwh: 0.00003893229166666667
energy-doubled: 0.00007786458333333334
cpu-times-duration: 450
Loading

0 comments on commit 219f0d7

Please sign in to comment.