Skip to content

Eco-CI: CO2 emissions and energy consumptions of pipelines (#393) #1069

Eco-CI: CO2 emissions and energy consumptions of pipelines (#393)

Eco-CI: CO2 emissions and energy consumptions of pipelines (#393) #1069

Workflow file for this run

name: Run CI
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
# on:
# push:
# tags:
# - "v*"
# jobs:
# publish:
# runs-on: ubuntu-latest
# steps:
# - name: 🏗 Setup repo
# uses: actions/checkout@v2
# - name: 🏗 Setup Node
# uses: actions/setup-node@v2
# with:
# node-version: 16.x
# cache: yarn
# - name: 🏗 Setup Expo
# uses: expo/expo-github-action@v7
# with:
# expo-version: latest
# token: ${{ secrets.EXPO_TOKEN }}
# - name: 📦 Install dependencies
# run: yarn install
# - name: 🚀 Publish app
# run: expo publish --non-interactive