-
-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Eco-CI: CO2 emissions and energy consumptions of pipelines (#393)
* Initial test of Eco-CI integration * Test success. Activating continue-on-error * Added caching * Removing comments * Removing unused permissions * Removed unused comments; Eco-CI v3 was updated. Trying new run
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,15 +5,56 @@ on: [push, pull_request] | |
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write # this allows to show table and charts in PRs | ||
steps: | ||
- name: Initialize Energy Estimation | ||
uses: green-coding-solutions/eco-ci-energy-estimation@v3 | ||
with: | ||
task: start-measurement | ||
continue-on-error: true | ||
|
||
- uses: actions/checkout@v3 | ||
- name: Measure Checkout | ||
uses: green-coding-solutions/eco-ci-energy-estimation@v3 | ||
with: | ||
task: get-measurement | ||
label: 'checkout repository' | ||
continue-on-error: true | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- name: Measure setup node | ||
uses: green-coding-solutions/eco-ci-energy-estimation@v3 | ||
with: | ||
task: get-measurement | ||
label: 'setup node' | ||
continue-on-error: true | ||
- run: yarn install | ||
- name: Measure yarn Install | ||
uses: green-coding-solutions/eco-ci-energy-estimation@v3 | ||
with: | ||
task: get-measurement | ||
label: 'yarn install' | ||
continue-on-error: true | ||
- uses: borales/[email protected] | ||
with: | ||
cmd: ci | ||
- name: Measure yarn CI | ||
uses: green-coding-solutions/eco-ci-energy-estimation@v3 | ||
with: | ||
task: get-measurement | ||
label: 'yarn ci' | ||
continue-on-error: true | ||
- name: Display results | ||
uses: green-coding-solutions/eco-ci-energy-estimation@v3 | ||
with: | ||
task: display-results | ||
pr-comment: true # will put a nice graphical table view in the PR comment | ||
show-carbon: true # will show the carbon values additional to energy | ||
send-data: true # set this to false if you do not want to use historical data view on https://metrics.green-coding.io/ci-index.html | ||
continue-on-error: true | ||
|
||
# publish.yml | ||
# name: Expo Publish | ||
|