Skip to content

Commit

Permalink
Give a try to eco-ci-energy-estimation
Browse files Browse the repository at this point in the history
  • Loading branch information
gmaze committed Jan 9, 2024
1 parent d5bc777 commit 42318d2
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/pytests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ concurrency:
cancel-in-progress: true

jobs:

detect-ci-skip:
name: detect ci skip
runs-on: ubuntu-latest
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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/[email protected]
with:
Expand All @@ -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
Expand Down

0 comments on commit 42318d2

Please sign in to comment.