From 61d2e20defc63f01f4c7c27e8dce94f8f34fb740 Mon Sep 17 00:00:00 2001 From: Akshay Iyyadurai Balasundaram Date: Wed, 7 Jun 2023 19:24:55 +0200 Subject: [PATCH 1/2] Adds energy consumption measurement --- .github/workflows/nodejs.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index f24738cd..56967f56 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -12,15 +12,22 @@ on: jobs: build: - runs-on: ubuntu-latest - strategy: matrix: node-version: [16.x] - steps: - - uses: actions/checkout@v2 + - name: Initialize Energy Estimation + uses: green-coding-berlin/eco-ci-energy-estimation@v1 + with: + task: start-measurement + - name: "Checkout repository" + uses: actions/checkout@v3 + - name: Checkout Repo Measurement + uses: green-coding-berlin/eco-ci-energy-estimation@v1 + with: + task: get-measurement + label: 'repo checkout' - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: @@ -29,3 +36,12 @@ jobs: run: npm ci - name: Npm build run: npm run build --if-present + - name: Checkout Repo Measurement + uses: green-coding-berlin/eco-ci-energy-estimation@v1 + with: + task: get-measurement + label: 'Npm activities' + - name: Show Energy Results + uses: green-coding-berlin/eco-ci-energy-estimation@v1 + with: + task: display-results From fb644d8218679b5d46509bdf9b41a4cd04ec1926 Mon Sep 17 00:00:00 2001 From: Akshay Iyyadurai Balasundaram Date: Wed, 7 Jun 2023 20:03:06 +0200 Subject: [PATCH 2/2] Update nodejs.yml --- .github/workflows/nodejs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 56967f56..56a54cec 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -27,7 +27,7 @@ jobs: uses: green-coding-berlin/eco-ci-energy-estimation@v1 with: task: get-measurement - label: 'repo checkout' + label: 'repository checkout' - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: