diff --git a/.github/workflows/codecov-from-main.yml b/.github/workflows/codecov-from-main.yml new file mode 100644 index 0000000..61f5cbd --- /dev/null +++ b/.github/workflows/codecov-from-main.yml @@ -0,0 +1,33 @@ +name: Upload codecov from main + +on: + pull_request: + types: + - closed + +jobs: + codecov-of-main: + name: codecov of main + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: main + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install .[dev] + - name: Generate coverage report + run: python -m pytest --cov --cov-report=xml + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + with: + fail_ci_if_error: false + token: ${{ secrets.CODECOV_TOKEN }} + slug: Stoops-ML/czml3 + verbose: true diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 84312db..6bbbde4 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -21,8 +21,8 @@ jobs: - name: Test with tox run: tox - codecov: - name: codecov + codecov-of-PR: + name: codecov of PR runs-on: ubuntu-latest steps: - uses: actions/checkout@v4