Skip to content

Commit

Permalink
Measure energy consumption of executing integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sdbuehlmann committed Feb 13, 2024
1 parent 28a0a18 commit c2e6d50
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/integration-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ name: Build project
on:
push:
branches:
- feature/*
- issue/*
- main
pull_request:
branches: [ main ]
Expand All @@ -16,13 +18,50 @@ jobs:
execute-unitand-integration-tests:
runs-on: ubuntu-latest
steps:
- name: Initialize Energy Estimation
uses: green-coding-solutions/eco-ci-energy-estimation@v2 # use hash or @vX here (See note below)
with:
task: start-measurement

- uses: actions/checkout@v2

- name: Checkout Repo Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@v2 # use hash or @vX here (See note below)
with:
task: get-measurement
label: 'repo checkout'

- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'

- name: Setup Java Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@v2 # use hash or @vX here (See note below)
with:
task: get-measurement
label: 'java setup'

- name: Run unit tests
run: ./gradlew test

- name: Tests measurement
uses: green-coding-solutions/eco-ci-energy-estimation@v2 # use hash or @vX here (See note below)
with:
task: get-measurement
label: 'unit tests'

- name: Run integration tests
run: ./gradlew integrationTest

- name: Tests measurement
uses: green-coding-solutions/eco-ci-energy-estimation@v2 # use hash or @vX here (See note below)
with:
task: get-measurement
label: 'integration tests'

- name: Show Energy Results
uses: green-coding-solutions/eco-ci-energy-estimation@v2 # use hash or @vX here (See note below)
with:
task: display-results

0 comments on commit c2e6d50

Please sign in to comment.