From 5259360152c8deaee29a09558730444b9d317690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Thu, 20 Feb 2025 20:29:57 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Add=20Codecov=20to=20CI,=20Smoke?= =?UTF-8?q?show/Cloudflare=20has=20been=20flaky=20lately?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 89 ++++++++++++++++++++------------------ 1 file changed, 48 insertions(+), 41 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9126db93c5..14621f791e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,54 +74,61 @@ jobs: env: COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.pydantic-version }} CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }} - - name: Store coverage files - uses: actions/upload-artifact@v4 + # - name: Store coverage files + # uses: actions/upload-artifact@v4 + # with: + # name: coverage-${{ matrix.python-version }}-${{ matrix.pydantic-version }} + # path: coverage + # include-hidden-files: true + - uses: codecov/codecov-action@v5 with: - name: coverage-${{ matrix.python-version }}-${{ matrix.pydantic-version }} - path: coverage - include-hidden-files: true + fail_ci_if_error: true + files: ./coverage.xml + name: codecov-umbrella + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true - coverage-combine: - needs: - - test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - name: Setup uv - uses: astral-sh/setup-uv@v5 - with: - version: "0.4.15" - enable-cache: true - cache-dependency-glob: | - requirements**.txt - pyproject.toml - - name: Get coverage files - uses: actions/download-artifact@v4 - with: - pattern: coverage-* - path: coverage - merge-multiple: true - - name: Install Dependencies - run: uv pip install -r requirements-tests.txt - - run: ls -la coverage - - run: coverage combine coverage - - run: coverage report - - run: coverage html --title "Coverage for ${{ github.sha }}" - - name: Store coverage HTML - uses: actions/upload-artifact@v4 - with: - name: coverage-html - path: htmlcov - include-hidden-files: true + # coverage-combine: + # needs: + # - test + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-python@v5 + # with: + # python-version: '3.12' + # - name: Setup uv + # uses: astral-sh/setup-uv@v5 + # with: + # version: "0.4.15" + # enable-cache: true + # cache-dependency-glob: | + # requirements**.txt + # pyproject.toml + # - name: Get coverage files + # uses: actions/download-artifact@v4 + # with: + # pattern: coverage-* + # path: coverage + # merge-multiple: true + # - name: Install Dependencies + # run: uv pip install -r requirements-tests.txt + # - run: ls -la coverage + # - run: coverage combine coverage + # - run: coverage report + # - run: coverage html --title "Coverage for ${{ github.sha }}" + # - name: Store coverage HTML + # uses: actions/upload-artifact@v4 + # with: + # name: coverage-html + # path: htmlcov + # include-hidden-files: true # https://github.com/marketplace/actions/alls-green#why alls-green: # This job does nothing and is only used for the branch protection if: always() needs: - - coverage-combine + - test runs-on: ubuntu-latest steps: - name: Decide whether the needed jobs succeeded or failed