Updated 2D inversion example #127
  
    
      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: Testing With Conda | |
| on: | |
| push: | |
| branches: | |
| - '*' | |
| pull_request: | |
| branches: | |
| - '*' | |
| jobs: | |
| build_and_test: | |
| name: Testing (${{ matrix.python-version }}, ${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ["ubuntu-latest"] | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Conda | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| auto-update-conda: true | |
| environment-file: .github/environment_ci.yml | |
| activate-environment: simpeg-torch-test | |
| python-version: ${{ matrix.python-version }} | |
| - name: Conda information | |
| run: | | |
| conda info | |
| conda list | |
| conda config --show | |
| - name: Install Our Package | |
| run: | | |
| pip install --no-build-isolation --editable . --config-settings=setup-args="-Dwith_extensions=true" | |
| - name: Run Tests | |
| run: | | |
| pytest tests --cov-config=.coveragerc --cov=simpegtorch --cov-report=xml -s -v -W ignore::DeprecationWarning | |
| - name: Upload coverage reports to Codecov | |
| if: matrix.python-version == '3.11' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: ubcgif/simpeg-torch | |
| fail_ci_if_error: true |