github actions config merge fix #1451
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: Python Package using Conda | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - devel_peterg | |
| - spc-main-devel | |
| workflow_dispatch: | |
| jobs: | |
| build-all: | |
| name: scqubits testing (${{ matrix.python-version }}, ${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash -el {0} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
| python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| name: Checkout repository | |
| - name: Python setup for macos-latest with python 3.7 | |
| if: ${{matrix.python-version == '3.7' && matrix.os == 'macos-latest'}} | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| miniforge-variant: Mambaforge | |
| use-mamba: true | |
| auto-update-conda: true | |
| python-version: ${{ matrix.python-version }} | |
| architecture: x64 | |
| channels: conda-forge | |
| - name: Python setup for the rest of the jobs | |
| if: ${{!(matrix.python-version == '3.7' && matrix.os == 'macos-latest')}} | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| miniforge-variant: Mambaforge | |
| use-mamba: true | |
| auto-update-conda: true | |
| python-version: ${{ matrix.python-version }} | |
| channels: conda-forge | |
| - name: conda info | |
| run: conda info | |
| - name: Add conda to system path | |
| run: | | |
| # $CONDA is an environment variable pointing to the root of the miniconda directory | |
| echo $CONDA/bin >> $GITHUB_PATH | |
| - name: Lint with flake8 | |
| run: | | |
| mamba install flake8 | |
| # stop the build if there are Python syntax errors or undefined names | |
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
| # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
| flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
| - name: Build with conda and run tests | |
| run: | | |
| mamba install boa | |
| conda mambabuild . |