-
Notifications
You must be signed in to change notification settings - Fork 26
66 lines (58 loc) · 2.22 KB
/
tests-bare-metal-main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Daily Test Run - Bare Metal - Main Branch
run-name: Scheduled - main branch
on:
schedule:
- cron: '0 */6 * * *'
workflow_dispatch:
jobs:
run-tests-main:
runs-on: local-test-arm64
permissions:
packages: write
contents: read
steps:
# - id: check-date
# if: ${{ github.event_name != 'workflow_dispatch' }}
# uses: green-coding-solutions/eco-ci-activity-checker@main
# with:
# repo: 'green-coding-solutions/green-metrics-tool'
# branch: 'main'
# workflow-id: 45267391
- name: Eco CI Energy Estimation - Initialize
uses: green-coding-solutions/eco-ci-energy-estimation@main
with:
task: start-measurement
project: "Green Metrics Tool"
machine: "ubuntu-latest"
tags: "CI/CD,Bare-Metal-main-Workflow"
gmt-api-token: ${{ secrets.GMT_API_TOKEN }}
electricitymaps-api-token: ${{ secrets.ELECTRICITYMAPS_TOKEN }}
# - if: ${{ github.event_name == 'workflow_dispatch' || steps.check-date.outputs.should_run == 'true'}}
- name: 'Checkout repository'
uses: actions/checkout@v4
with:
ref: 'main'
submodules: 'false'
- name: Eco CI Energy Estimation - Initialize
uses: green-coding-solutions/eco-ci-energy-estimation@main
with:
task: start-measurement
project: "Green Metrics Tool"
machine: "ubuntu-latest"
tags: "CI/CD, PR-Workflow"
gmt-api-token: ${{ secrets.GMT_API_TOKEN }}
electricitymaps-api-token: ${{ secrets.ELECTRICITYMAPS_TOKEN }}
# - if: ${{ github.event_name == 'workflow_dispatch' || steps.check-date.outputs.should_run == 'true'}}
- name: 'Setup, Run, and Teardown Tests'
uses: ./.github/actions/gmt-pytest
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Eco CI Energy Estimation - Get Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@main
with:
task: get-measurement
- name: Eco CI Energy Estimation - End Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@main
with:
task: display-results
pr-comment: true