make calls to get workflow_id only if send-data is set to true #210
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 the action locally | |
on: | |
push: | |
paths-ignore: | |
- 'README.md' | |
- 'LICENSE' | |
pull_request: | |
branches: | |
- main | |
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 meantim | |
- cron: '22 4 * * 6' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
actions: read | |
pull-requests: write | |
jobs: | |
test-action: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref }} | |
- name: Initialize Energy Estimation | |
uses: ./ | |
with: | |
task: start-measurement | |
- name: Wait before the next step | |
run: sleep 2 | |
- name: Test measurement 1 | |
uses: ./ | |
with: | |
task: get-measurement | |
- name: Wait before the next step | |
run: sleep 2 | |
- name: Test measurement 2 | |
uses: ./ | |
with: | |
task: get-measurement | |
label: "Sleep #2" | |
- name: Eco CI Energy Estimation | |
uses: ./ | |
with: | |
task: display-results | |
pr-comment: true |