Skip to content

Commit 0ef548f

Browse files
committed
Added minimal setup for our new eco ci runner
1 parent 83cbedd commit 0ef548f

File tree

1 file changed

+24
-33
lines changed

1 file changed

+24
-33
lines changed
Lines changed: 24 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,50 @@
1-
name: Daily Test Run - Bare Metal - Main Branch
1+
name: Daily Test Run - Virtual Machine - Main Branch
22
run-name: Scheduled - main branch
33
on:
4-
schedule:
5-
- cron: '0 */6 * * *'
4+
# schedule:
5+
# - cron: '2 50 * * *'
66
workflow_dispatch:
77

88
jobs:
99
run-tests-main:
10-
runs-on: local-test-arm64
11-
permissions:
12-
packages: write
13-
contents: read
10+
runs-on: eco-ci-runner-tx1330-m4
1411
steps:
15-
# - id: check-date
16-
# if: ${{ github.event_name != 'workflow_dispatch' }}
17-
# uses: green-coding-solutions/eco-ci-activity-checker@main
18-
# with:
19-
# repo: 'green-coding-solutions/green-metrics-tool'
20-
# branch: 'main'
21-
# workflow-id: 45267391
22-
2312
- name: Eco CI Energy Estimation - Initialize
2413
uses: green-coding-solutions/eco-ci-energy-estimation@main
2514
with:
2615
task: start-measurement
2716
project: "Green Metrics Tool"
28-
machine: "ubuntu-latest"
29-
tags: "CI/CD,Bare-Metal-main-Workflow"
17+
machine: "eco-ci-runner-tx1330-m4"
18+
tags: "CI/CD, Main-Workflow"
3019
gmt-api-token: ${{ secrets.GMT_API_TOKEN }}
31-
electricitymaps-api-token: ${{ secrets.ELECTRICITYMAPS_TOKEN }}
20+
# Intensity for our own solar panels
21+
co2-calculation-method: 'constant'
22+
co2-grid-intensity-constant: 30
3223

33-
# - if: ${{ github.event_name == 'workflow_dispatch' || steps.check-date.outputs.should_run == 'true'}}
34-
- name: 'Checkout repository'
35-
uses: actions/checkout@v4
24+
- id: check-date
25+
if: ${{ github.event_name != 'workflow_dispatch' }}
26+
uses: green-coding-solutions/eco-ci-activity-checker@v1
3627
with:
37-
ref: 'main'
38-
submodules: 'false'
28+
branch: 'main'
3929

40-
- name: Eco CI Energy Estimation - Initialize
30+
- name: Eco CI Energy Estimation - After Check Measurement
4131
uses: green-coding-solutions/eco-ci-energy-estimation@main
4232
with:
43-
task: start-measurement
44-
project: "Green Metrics Tool"
45-
machine: "ubuntu-latest"
46-
tags: "CI/CD, PR-Workflow"
47-
gmt-api-token: ${{ secrets.GMT_API_TOKEN }}
48-
electricitymaps-api-token: ${{ secrets.ELECTRICITYMAPS_TOKEN }}
33+
task: get-measurement
4934

35+
- if: ${{ github.event_name == 'workflow_dispatch' || steps.check-date.outputs.should_run == 'true'}}
36+
name: 'Checkout repository'
37+
uses: actions/checkout@v4
38+
with:
39+
ref: 'main'
40+
submodules: 'false'
5041

51-
# - if: ${{ github.event_name == 'workflow_dispatch' || steps.check-date.outputs.should_run == 'true'}}
52-
- name: 'Setup, Run, and Teardown Tests'
42+
- if: ${{ github.event_name == 'workflow_dispatch' || steps.check-date.outputs.should_run == 'true'}}
43+
name: 'Setup, Run, and Teardown Tests'
5344
uses: ./.github/actions/gmt-pytest
5445
with:
5546
github-token: ${{ secrets.GITHUB_TOKEN }}
47+
tests-command: "pytest api/test_api_software_add.py::test_post_run_add_github_tags -vv"
5648

5749
- name: Eco CI Energy Estimation - Get Measurement
5850
uses: green-coding-solutions/eco-ci-energy-estimation@main
@@ -63,4 +55,3 @@ jobs:
6355
uses: green-coding-solutions/eco-ci-energy-estimation@main
6456
with:
6557
task: display-results
66-
pr-comment: true

0 commit comments

Comments
 (0)