Scheduled - main branch #1108
This file contains hidden or 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: | |
| inputs: | |
| enable-ssh: | |
| description: 'Enable SSH connection for debugging purposes' | |
| required: false | |
| type: boolean | |
| test-path: | |
| description: 'Specific test path to run' | |
| required: false | |
| type: string | |
| jobs: | |
| run-tests-main: | |
| runs-on: ubuntu-latest | |
| 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 }} | |
| # Intensity for California in 2024 | |
| co2-calculation-method: 'constant' | |
| co2-grid-intensity-constant: 231 | |
| - 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@v5 | |
| with: | |
| ref: 'main' | |
| submodules: 'false' | |
| - 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 }} | |
| enable-ssh: ${{ inputs.enable-ssh }} | |
| test-path: ${{ inputs.test-path }} | |
| - 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 |