|
22 | 22 | recent_gmt_commit: ${{ steps.check_gmt_commits.outputs.should_run }}
|
23 | 23 | recent_examples_commit: ${{ steps.check_examples_commits.outputs.should_run }}
|
24 | 24 | steps:
|
| 25 | + - name: Initialize Energy Estimation |
| 26 | + uses: green-coding-solutions/eco-ci-energy-estimation@main |
| 27 | + with: |
| 28 | + task: start-measurement |
| 29 | + project: "Green Metrics Tool" |
| 30 | + machine: "ubuntu-latest" |
| 31 | + tags: "CI/CD,Example-Tests-Check-Commits" |
| 32 | + gmt-api-token: ${{ secrets.GMT_API_TOKEN }} |
| 33 | + electricitymaps-api-token: ${{ secrets.ELECTRICITYMAPS_TOKEN }} |
| 34 | + |
25 | 35 | - id: check_gmt_commits
|
26 | 36 | uses: green-coding-solutions/green-ci-activity-checker@main
|
27 | 37 | with:
|
|
35 | 45 | branch: 'main'
|
36 | 46 | workflow-id: 45266619
|
37 | 47 |
|
| 48 | + - name: Energy Estimation - Get Measurement |
| 49 | + uses: green-coding-solutions/eco-ci-energy-estimation@main |
| 50 | + with: |
| 51 | + task: get-measurement |
| 52 | + |
| 53 | + - name: Energy Estimation - End Measurement |
| 54 | + uses: green-coding-solutions/eco-ci-energy-estimation@main |
| 55 | + with: |
| 56 | + task: display-results |
| 57 | + |
38 | 58 | run-tests:
|
39 | 59 | needs: check-commits
|
40 | 60 | if: ${{ needs.check-commits.outputs.recent_examples_commit == 'true' || needs.check-commits.outputs.recent_gmt_commit == 'true' || github.event_name == 'workflow_dispatch'}}
|
|
45 | 65 | uses: green-coding-solutions/eco-ci-energy-estimation@main
|
46 | 66 | with:
|
47 | 67 | task: start-measurement
|
| 68 | + project: "Green Metrics Tool" |
| 69 | + machine: "ubuntu-latest" |
| 70 | + tags: "CI/CD,Example-Tests-Main" |
| 71 | + gmt-api-token: ${{ secrets.GMT_API_TOKEN }} |
| 72 | + electricitymaps-api-token: ${{ secrets.ELECTRICITYMAPS_TOKEN }} |
48 | 73 |
|
49 | 74 | - name: Checkout Examples Directory
|
50 | 75 | uses: actions/checkout@v4
|
|
0 commit comments