diff --git a/.github/workflows/pytests.yml b/.github/workflows/pytests.yml index 0f7f870e..0804c24b 100644 --- a/.github/workflows/pytests.yml +++ b/.github/workflows/pytests.yml @@ -14,7 +14,6 @@ concurrency: cancel-in-progress: true jobs: - detect-ci-skip: name: detect ci skip runs-on: ubuntu-latest @@ -54,6 +53,11 @@ jobs: experimental: [false] steps: + - name: Initialize Energy Estimation + uses: green-coding-berlin/eco-ci-energy-estimation@v2 # use hash or @vX here (See note below) + with: + task: start-measurement + - uses: actions/checkout@v4 - name: Set environment variables @@ -82,6 +86,12 @@ jobs: micromamba info micromamba list + - name: Setup Measurement + uses: green-coding-berlin/eco-ci-energy-estimation@v2 # use hash or @vX here (See note below) + with: + task: get-measurement + label: 'setup' + - name: Lint with flake8 run: | flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics @@ -91,6 +101,12 @@ jobs: run: | pytest -ra -v -s -c argopy/tests/pytest.ini --durations=10 --cov=./ --cov-config=.coveragerc --cov-report xml:cov.xml --cov-report term-missing --log-file=${{env.LOG_FILE}} + - name: Tests measurement + uses: green-coding-berlin/eco-ci-energy-estimation@v2 # use hash or @vX here (See note below) + with: + task: get-measurement + label: 'pytest' + - name: Upload coverage to Codecov uses: codecov/codecov-action@v3.1.4 with: @@ -108,6 +124,11 @@ jobs: path: ${{env.LOG_FILE}} retention-days: 90 + - name: Show Energy Results + uses: green-coding-berlin/eco-ci-energy-estimation@v2 # use hash or @vX here (See note below) + with: + task: display-results + all-pinned: # CI tests for environments with all requirements in pinned versions # All commits must pass this