diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml deleted file mode 100644 index 81ecbd2..0000000 --- a/.github/workflows/codecov.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Run tests and upload coverage - -on: - push - -jobs: - test: - name: Run tests and collect coverage - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up Python - uses: actions/setup-python@v4 - - - name: Install dependencies - run: pip install pytest pytest-cov - - - name: Run tests - run: pytest --cov --cov-report=xml - - - name: Upload results to Codecov - uses: codecov/codecov-action@v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 9fd06cb..e617a0b 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -1,26 +1,30 @@ -name: Python package - +name: Python pytest and upload to Codecov on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install pytest - - name: Run tests - run: | - pytest tests + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.x" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install . + pip install pytest pytest-cov + - name: Run tests + run: | + pytest tests + pytest --cov --cov-report=xml + - name: Upload results to Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }}