From 1b927898a1b4aaf2f042184b0e0117b1b476d04b Mon Sep 17 00:00:00 2001 From: Justin Xu <52216145+justin13601@users.noreply.github.com> Date: Thu, 9 May 2024 03:25:04 -0700 Subject: [PATCH] Update ci.yml --- .github/workflows/ci.yml | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c00ddca..8a779f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,30 @@ -- name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4.0.1 - with: - token: ${{ secrets.CODECOV_TOKEN }} +name: Workflow for Codecov example-python +on: [push, pull_request] +jobs: + run: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Install dependencies + run: pip install . + - name: Run ATS + uses: codecov/codecov-ats@v0 + env: + CODECOV_STATIC_TOKEN: ${{ secrets.CODECOV_STATIC_TOKEN }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + - name: Run tests and collect coverage + run: pytest --cov app ${{ env.CODECOV_ATS_TESTS }} + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + flags: smart-tests + verbose: true + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}