Testing CarbonDB 2.0 #11
Workflow file for this run
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
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 | |
project: "CI Testing" | |
machine: "ubuntu-latest" | |
tags: "That,is,very cool" | |
api-endpoint-add: "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 |