diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f44d0c..3eb39e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,12 +6,20 @@ on: pull_request: branches: [ "main" ] -permissions: {} +permissions: + contents: read + pull-requests: write jobs: build: runs-on: ubuntu-latest steps: + - name: Start Measurement + uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0 + with: + task: start-measurement + continue-on-error: true + - name: Checkout code uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 @@ -29,10 +37,30 @@ jobs: path: public/ retention-days: 1 + - name: Get measurement + uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0 + with: + task: get-measurement + label: 'build' + continue-on-error: true + + - name: Show Energy Results + uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0 + with: + task: display-results + pr-comment: true + continue-on-error: true + axe-core: needs: build runs-on: ubuntu-latest steps: + - name: Start Measurement + uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0 + with: + task: start-measurement + continue-on-error: true + - name: Download build artifact uses: actions/download-artifact@v8 with: @@ -60,10 +88,30 @@ jobs: if: always() run: echo "Accessibility testing completed. Check logs above for any violations." + - name: Get measurement + uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0 + with: + task: get-measurement + label: 'axe-core' + continue-on-error: true + + - name: Show Energy Results + uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0 + with: + task: display-results + pr-comment: true + continue-on-error: true + lighthouse: needs: build runs-on: ubuntu-latest steps: + - name: Start Measurement + uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0 + with: + task: start-measurement + continue-on-error: true + - name: Checkout code uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 @@ -82,3 +130,17 @@ jobs: run: bunx @lhci/cli@0.15.x autorun env: LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} + + - name: Get measurement + uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0 + with: + task: get-measurement + label: 'lighthouse' + continue-on-error: true + + - name: Show Energy Results + uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0 + with: + task: display-results + pr-comment: true + continue-on-error: true diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index bcc725a..4eb48df 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -21,7 +21,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - name: Set up uv - uses: astral-sh/setup-uv@v7 + uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 with: python-version: "3.14" activate-environment: true