|
1 |
| -name: Daily Test Run - Bare Metal - Main Branch |
| 1 | +name: Daily Test Run - Virtual Machine - Main Branch |
2 | 2 | run-name: Scheduled - main branch
|
3 | 3 | on:
|
4 |
| - schedule: |
5 |
| - - cron: '0 */6 * * *' |
| 4 | +# schedule: |
| 5 | +# - cron: '2 50 * * *' |
6 | 6 | workflow_dispatch:
|
7 | 7 |
|
8 | 8 | jobs:
|
9 | 9 | 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 |
14 | 11 | 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 |
| - |
23 | 12 | - name: Eco CI Energy Estimation - Initialize
|
24 | 13 | uses: green-coding-solutions/eco-ci-energy-estimation@main
|
25 | 14 | with:
|
26 | 15 | task: start-measurement
|
27 | 16 | 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" |
30 | 19 | 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 |
32 | 23 |
|
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 |
36 | 27 | with:
|
37 |
| - ref: 'main' |
38 |
| - submodules: 'false' |
| 28 | + branch: 'main' |
39 | 29 |
|
40 |
| - - name: Eco CI Energy Estimation - Initialize |
| 30 | + - name: Eco CI Energy Estimation - After Check Measurement |
41 | 31 | uses: green-coding-solutions/eco-ci-energy-estimation@main
|
42 | 32 | 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 |
49 | 34 |
|
| 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' |
50 | 41 |
|
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' |
53 | 44 | uses: ./.github/actions/gmt-pytest
|
54 | 45 | with:
|
55 | 46 | github-token: ${{ secrets.GITHUB_TOKEN }}
|
| 47 | + tests-command: "pytest api/test_api_software_add.py::test_post_run_add_github_tags -vv" |
56 | 48 |
|
57 | 49 | - name: Eco CI Energy Estimation - Get Measurement
|
58 | 50 | uses: green-coding-solutions/eco-ci-energy-estimation@main
|
|
63 | 55 | uses: green-coding-solutions/eco-ci-energy-estimation@main
|
64 | 56 | with:
|
65 | 57 | task: display-results
|
66 |
| - pr-comment: true |
0 commit comments