Scheduled - main branch #718
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: Daily Test Run - Virtual Machine - Main Branch | |
run-name: Scheduled - main branch | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
jobs: | |
run-tests-main: | |
runs-on: ubuntu-24.04 | |
steps: | |
- 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, Main-Workflow" | |
gmt-api-token: ${{ secrets.GMT_API_TOKEN }} | |
electricitymaps-api-token: ${{ secrets.ELECTRICITYMAPS_TOKEN }} | |
- id: check-date | |
if: ${{ github.event_name != 'workflow_dispatch' }} | |
uses: green-coding-solutions/eco-ci-activity-checker@v1 | |
with: | |
branch: 'main' | |
- name: Eco CI Energy Estimation - After Check Measurement | |
uses: green-coding-solutions/eco-ci-energy-estimation@main | |
with: | |
task: get-measurement | |
- if: ${{ github.event_name == 'workflow_dispatch' || steps.check-date.outputs.should_run == 'true'}} | |
name: 'Checkout repository' | |
uses: actions/checkout@v4 | |
with: | |
ref: 'main' | |
submodules: 'true' | |
- 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 | |
- if: ${{ github.event_name == 'workflow_dispatch' || steps.check-date.outputs.should_run == 'true'}} | |
name: Eco CI Energy Estimation - End Measurement | |
uses: green-coding-solutions/eco-ci-energy-estimation@main | |
with: | |
task: display-results |