Add a new reference to the README #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI - Tests and Coverage | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.11", "3.12"] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e . | |
| pip install pytest pytest-cov coverage | |
| - name: Run tests with coverage | |
| run: | | |
| pytest --disable-warnings --cov=multiviewstacking --cov-report=xml --cov-report=term-missing | |
| - name: Verify coverage file exists | |
| run: | | |
| echo "Listing coverage files..." | |
| ls -lah . | |
| test -f coverage.xml || (echo "X coverage.xml not found!" && exit 1) | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} # remove if public repo | |
| file: ./coverage.xml | |
| flags: unittests | |
| fail_ci_if_error: true | |
| verbose: true |