Skip to content

Commit 31fd41a

Browse files
committed
ci: eco ci measurements
1 parent d66bd5e commit 31fd41a

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/CI.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,18 @@ jobs:
88
test:
99
runs-on: ubuntu-latest
1010
steps:
11+
- name: Start Measurement
12+
uses: green-coding-solutions/eco-ci-energy-estimation@v4
13+
with:
14+
task: start-measurement
15+
continue-on-error: true
1116
- uses: actions/checkout@v4
17+
- name: Checkout Repo Measurement
18+
uses: green-coding-solutions/eco-ci-energy-estimation@v4
19+
with:
20+
task: get-measurement
21+
label: 'repo checkout'
22+
continue-on-error: true
1223
- uses: actions/setup-node@v4
1324
with:
1425
node-version: '20'
@@ -25,12 +36,30 @@ jobs:
2536
${{ runner.os }}-
2637
- name: Install
2738
run: yarn --immutable
39+
- name: Setup and install Measurment
40+
uses: green-coding-solutions/eco-ci-energy-estimation@v4
41+
with:
42+
task: get-measurement
43+
label: 'setup-and-install'
44+
continue-on-error: true
2845
- name: Build
2946
run: yarn build
47+
- name: Build Measurment
48+
uses: green-coding-solutions/eco-ci-energy-estimation@v4
49+
with:
50+
task: get-measurement
51+
label: 'build'
52+
continue-on-error: true
3053
- name: Unit Tests
3154
run: yarn test
3255
- name: Lint
3356
run: yarn lint
57+
- name: Test and Lint Measurment
58+
uses: green-coding-solutions/eco-ci-energy-estimation@v4
59+
with:
60+
task: get-measurement
61+
label: 'test-and-lint'
62+
continue-on-error: true
3463
- name: Install, build and start demo app
3564
run: |
3665
cd examples/my-ngsw-app
@@ -41,3 +70,14 @@ jobs:
4170
cd examples/my-ngsw-app
4271
npx playwright install chromium
4372
npm run test:e2e
73+
- name: E2E tests Measurment
74+
uses: green-coding-solutions/eco-ci-energy-estimation@v4
75+
with:
76+
task: get-measurement
77+
label: 'e2e-test'
78+
continue-on-error: true
79+
- name: Show Energy Results
80+
uses: green-coding-solutions/eco-ci-energy-estimation@v4
81+
with:
82+
task: display-results
83+
continue-on-error: true

0 commit comments

Comments
 (0)