Bump actions/checkout from 3 to 4 in /.github/workflows #617
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-action | |
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: ${{ matrix.os }} | |
continue-on-error: false | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-20.04] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: API Base Debug | |
run: | | |
echo "Current API Base is" ${{ github.api_url }} | |
- name: Initialize Energy Estimation | |
uses: ./ | |
with: | |
task: start-measurement | |
company-uuid: "20b269ce-cd67-4788-8614-030eaf5a0b47" | |
project-uuid: "00000000-E63D-43E9-9714-A4DE9464F3D8" | |
machine-uuid: "00000001-E63D-43E9-9714-A4DE9464F3D8" | |
- 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: "Sleep 3s" | |
- name: Dump ECO-CI CPU Step actual processed | |
run: | | |
cat /tmp/eco-ci/cpu-util-temp.txt | |
- name: Dump ECO-CI Energy Step actual processed | |
run: | | |
cat /tmp/eco-ci/energy-step.txt | |
- name: Filesystem | |
run: timeout 10s ls -alhR /usr/lib | |
continue-on-error: true | |
- name: Test measurement 2 | |
uses: ./ | |
with: | |
task: get-measurement | |
label: "ls -alhR /usr/lib" | |
- name: Sleep 3 | |
run: sleep 3 | |
- name: Test measurement 2 | |
uses: ./ | |
with: | |
task: get-measurement | |
label: "Sleep 3s" | |
- name: Dump ECO-CI CPU | |
run: | | |
cat /tmp/eco-ci/cpu-util-total.txt | |
- name: Dump ECO-CI Energy | |
run: | | |
cat /tmp/eco-ci/energy-total.txt | |
- name: Eco CI Energy Estimation | |
uses: ./ | |
env: | |
ELECTRICITY_MAPS_TOKEN: ${{ secrets.ELECTRICITY_MAPS_TOKEN }} | |
with: | |
task: display-results | |
pr-comment: true |