feat: Added greenframe scenarios for prototype 1. #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Footprint | ||
on: | ||
push: | ||
jobs: | ||
evaluate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download sources | ||
uses: actions/checkout@v4 | ||
with: | ||
Check failure on line 11 in .github/workflows/test.yaml
|
||
fetch-depth: 0 # Greenframe needs the whole history | ||
- name: Set up NodeJS | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: npm | ||
cache-dependency-path: frontend/package-lock.json | ||
- name: Install frontend dependencies | ||
run: | | ||
cd frontend | ||
npm install | ||
- name: Build frontend | ||
run: | | ||
cd frontend | ||
npm run build | ||
- name: Start frontend | ||
run: | | ||
docker compose up --detach | ||
- name: Wait for frontend | ||
uses: docker://benel/wait-for-response:1 | ||
with: | ||
args: http://localhost/ 200 30000 500 | ||
- name: Watch frontend initial payload | ||
run: curl --silent localhost | ||
- name: Measure carbon footprint | ||
uses: marmelab/[email protected] | ||
env: | ||
GREENFRAME_SECRET_TOKEN: ${{secrets.GREENFRAME_SECRET_TOKEN}} |