Skip to content

Eco CI first integration #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 54 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Run tests

on: [push]
on:
push:
paths-ignore:
- '**.md'
- '.gitignore'

defaults:
run:
Expand All @@ -9,6 +13,8 @@ defaults:
jobs:
run_tests:
runs-on: ubuntu-latest
permissions:
pull-requests: write # this allows to show table and charts in PRs

services:
mariadb:
Expand All @@ -34,16 +40,43 @@ jobs:
python-version: [3.11]

steps:
- name: Eco CI Energy Estimation - Initialize
uses: green-coding-solutions/eco-ci-energy-estimation@main
with:
task: start-measurement
company-uuid: "7f1d34f0-7666-4378-8d8f-d37cced7ccb0"
project-uuid: "a9946d61-149b-4757-99e5-aaac24acf289"
continue-on-error: true

- uses: actions/checkout@v4
- name: Eco CI Energy Estimation - Get Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@main
with:
task: get-measurement
label: 'checkout'
continue-on-error: true

- name: Use Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Eco CI Energy Estimation - Get Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@main
with:
task: get-measurement
label: 'setup-python'
continue-on-error: true

- name: Install tooling for managing dependencies
run: |
python -m pip install --upgrade uv wheel
- name: Eco CI Energy Estimation - Get Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@main
with:
task: get-measurement
label: 'pip install uv wheel'
continue-on-error: true

# - name: Set up a cache-key for installations of dependencies, in .venv
# id: cache-venv
Expand All @@ -59,6 +92,12 @@ jobs:
run: |
uv venv
uv pip install -r requirements/requirements.linux.generated.txt
- name: Eco CI Energy Estimation - Get Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@main
with:
task: get-measurement
label: 'pip install requirements'
continue-on-error: true

- name: Run tests
run: |
Expand All @@ -80,3 +119,17 @@ jobs:
EQUINIX_REMOTE_API_ENDPOINT: ${{ secrets.EQUINIX_REMOTE_API_ENDPOINT }}
AWS_SHARED_CREDENTIALS_FILE: ${{ secrets.AWS_SHARED_CREDENTIALS_FILE }}
AWS_CONFIG_FILE: ${{ secrets.AWS_CONFIG_FILE }}
- name: Eco CI Energy Estimation - Get Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@main
with:
task: get-measurement
label: 'pytest'
continue-on-error: true

- name: Eco CI Energy Estimation - End Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@main
with:
task: display-results
pr-comment: true
send-data: true
continue-on-error: true
Loading