change readme #46
This file contains hidden or 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: Test | |
| on: | |
| push: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download sources | |
| uses: actions/checkout@v4 | |
| - name: Set up NodeJS | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| 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: Save frontend build for later | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: frontend-build | |
| path: frontend/dist | |
| build_samples: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download sources | |
| uses: actions/checkout@v4 | |
| - name: Set up NodeJS | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Generate sample data | |
| run: node generate_data.js | |
| - name: Save samples for later | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: samples | |
| path: public/*.json | |
| measure_ecoindex: | |
| needs: | |
| - build | |
| - build_samples | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download sources | |
| uses: actions/checkout@v4 | |
| - name: Start application | |
| uses: ./.github/actions/start | |
| - name: Install GreenIT Analysis CLI | |
| run: | | |
| wget https://github.com/cnumr/GreenIT-Analysis-cli/archive/refs/heads/master.zip | |
| unzip master.zip | |
| cd GreenIT-Analysis-cli-master | |
| npm install | |
| npm link | |
| - name: Run GreenIT Analysis CLI | |
| run: | | |
| greenit analyse --format html --ci greenit-analysis/scenarios/recherche-covoiturage.yml | |
| - name: Save results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: EcoIndex-Report | |
| path: "*.html" | |
| measure_energy_consumption: | |
| needs: | |
| - build | |
| - build_samples | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download sources | |
| uses: actions/checkout@v4 | |
| - name: Start application | |
| uses: ./.github/actions/start | |
| - name: Install GreenFrame CLI | |
| run: | | |
| wget https://github.com/benel/greenframe-cli/archive/refs/heads/post-app.zip | |
| unzip post-app.zip | |
| cd greenframe-cli-post-app | |
| npm install -g corepack | |
| yarn | |
| yarn build | |
| - name: Run GreenFrame CLI | |
| run: | | |
| ./greenframe-cli-post-app/bin/run analyze > Consumption.txt | |
| - name: Save results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Consumption | |
| path: Consumption.txt |