diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb23bd64..5e5de7e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,17 +14,20 @@ jobs: python-version: '3.10' - name: Install dependencies run: pip install -r requirements.txt - - 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 }} + run: pytest --cov app --junitxml=testresults.xml + continue-on-error: true + + - name: cat testresults.xml + run: cat testresults.xml + - name: Install CLI + run: pip install --no-cache-dir git+https://github.com/codecov/codecov-cli.git@joseph/test-results-staging + - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4-beta - with: - flags: smart-tests - verbose: true + run: codecovcli -v -u ${{ secrets.CODECOV_STAGING_API_URL }} upload-process + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }} + - name: Upload test results to Codecov + run: codecovcli -v -u ${{ secrets.CODECOV_STAGING_API_URL }} do-upload --report-type test_results --file testresults.xml env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }} diff --git a/app/test_calculator.py b/app/test_calculator.py index f5641938..3efaac11 100644 --- a/app/test_calculator.py +++ b/app/test_calculator.py @@ -2,7 +2,7 @@ def test_add(): - assert Calculator.add(1, 2) == 3.0 + assert Calculator.add(1, 2) == 4.0 assert Calculator.add(1.0, 2.0) == 3.0 assert Calculator.add(0, 2.0) == 2.0 assert Calculator.add(2.0, 0) == 2.0