Update submodule #46
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 | |
| on: | |
| push: | |
| branches: [develop, master] | |
| pull_request: | |
| branches: [develop] | |
| jobs: | |
| # This workflow contains a single job called "build" | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| - name: Prepare venv | |
| run: | | |
| pip install --upgrade pip | |
| python -m venv venv | |
| - name: Activate venv (Linux) | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| run: source ./venv/bin/activate | |
| - name: Activate venv (Windows) | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| run: .\venv\Scripts\activate.ps1 | |
| - name: Install library | |
| run: pip install . --verbose | |
| - name: Install test dependencies | |
| run: pip install scipy coverage | |
| - name: Execute tests and generate code coverage data | |
| run: | | |
| cd test | |
| coverage run --source ../pylanczos/ -m unittest discover ./ -v | |
| coverage xml | |
| - name: Upload coverage data to Codecov | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| uses: codecov/codecov-action@v1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| file: ./test/coverage.xml | |
| fail_ci_if_error: true |