Skip to content

Testing CarbonDB 2.0 #2

Testing CarbonDB 2.0

Testing CarbonDB 2.0 #2

Workflow file for this run

name: Test CarbonDB
on:
pull_request:
paths-ignore:
- 'README.md'
- 'LICENSE'
- '.gitlab-ci.yml.example'
- '.gitignore'
schedule:
# only run once a week to show the action is working and preserve as much energy as possible
# Reason being that we pull our ML model and this could have changed in the meantime
- cron: '22 4 * * 6'
workflow_dispatch:
permissions:
contents: read
actions: read
pull-requests: write
jobs:
test-action:
runs-on: ubuntu-22.04
continue-on-error: false
steps:
- name: Debug Info
run: |
echo "Runner OS: ${{ runner.os }}"
echo "Runner Name: ${{ runner.name }}"
echo "Runner Labels: ${{ runner.labels }}"
- uses: actions/checkout@v4
with:
path: .
- name: API Base Debug
run: |
echo "Current API Base is" ${{ github.api_url }}
- name: Initialize Energy Estimation
uses: ./
with:
task: start-measurement
# type should be auto set to machine.ci
company: "My cool company"
project: "CI Testing"
machine: "ubuntu-latest"
tags: '["That-os-one","That-is-number-two"]'
api-endpoint: "http://api-478gtuzwbe72.green-coding.io:9142/v2/ci/measurement/add"
- name: Sleep step
run: sleep 2
- name: Dump ECO-CI CPU Step before
run: |
cat /tmp/eco-ci/cpu-util-step.txt
- name: Dump ECO-CI CPU before
run: |
cat /tmp/eco-ci/cpu-util-total.txt
- name: Test measurement 1
uses: ./
with:
task: get-measurement
label: "I am just a simple, simple man."
- name: Eco CI Energy Estimation
uses: ./
env:
ELECTRICITY_MAPS_TOKEN: ${{ secrets.ELECTRICITY_MAPS_TOKEN }}
with:
task: display-results
pr-comment: true