Skip to content

Commit

Permalink
ci: eco ci measurements
Browse files Browse the repository at this point in the history
  • Loading branch information
vscaiceanu-1a committed Dec 26, 2024
1 parent d66bd5e commit cfba883
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,20 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Start Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@v4
with:
task: start-measurement
continue-on-error: true

- uses: actions/checkout@v4
- name: Checkout Repo Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@v4
with:
task: get-measurement
label: 'repo checkout'
continue-on-error: true

- uses: actions/setup-node@v4
with:
node-version: '20'
Expand All @@ -25,12 +38,31 @@ jobs:
${{ runner.os }}-
- name: Install
run: yarn --immutable
- name: Setup and install Measurment
uses: green-coding-solutions/eco-ci-energy-estimation@v4
with:
task: get-measurement
label: 'setup-and-install'
continue-on-error: true

- name: Build
run: yarn build
- name: Build Measurment
uses: green-coding-solutions/eco-ci-energy-estimation@v4
with:
task: get-measurement
label: 'build'
continue-on-error: true
- name: Unit Tests
run: yarn test
- name: Lint
run: yarn lint
- name: Test and Lint Measurment
uses: green-coding-solutions/eco-ci-energy-estimation@v4
with:
task: get-measurement
label: 'test-and-lint'
continue-on-error: true
- name: Install, build and start demo app
run: |
cd examples/my-ngsw-app
Expand All @@ -41,3 +73,14 @@ jobs:
cd examples/my-ngsw-app
npx playwright install chromium
npm run test:e2e
- name: E2E tests Measurment
uses: green-coding-solutions/eco-ci-energy-estimation@v4
with:
task: get-measurement
label: 'e2e-test'
continue-on-error: true
- name: Show Energy Results
uses: green-coding-solutions/eco-ci-energy-estimation@v4 # use hash or @vX here (See note below)
with:
task: display-results
# continue-on-error: true # recommended setting for production. See notes below.

0 comments on commit cfba883

Please sign in to comment.