ci: sort out what should be tested where #387
Workflow file for this run
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
| # This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
| name: CI | |
| on: [push] | |
| jobs: | |
| build: | |
| env: | |
| MPLBACKEND: Agg | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| python-version: ['3.11', '3.13'] | |
| os: [macos-latest, ubuntu-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install flake8 pytest | |
| pip install -e . | |
| - name: Lint with flake8 | |
| run: | | |
| flake8 temul tests docs | |
| - name: Test with pytest | |
| run: | | |
| pytest tests --ignore=tests/test_pypris | |
| pytest --doctest-modules temul/topotem temul/element_tools.py temul/intensity_tools.py temul/io.py temul/model_creation.py temul/signal_plotting.py temul/signal_processing.py | |
| pyprismatic-conda: | |
| env: | |
| MPLBACKEND: Agg | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Miniconda | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| activate-environment: temul-pyprismatic | |
| environment-file: environment-pyprismatic.yml | |
| auto-activate-base: false | |
| miniforge-variant: Miniforge3 | |
| use-mamba: true | |
| - name: Verify pyprismatic install | |
| shell: bash -l {0} | |
| run: | | |
| python -c "import pyprismatic; print(pyprismatic.__file__)" | |
| - name: Lint pyprismatic-related tests | |
| shell: bash -l {0} | |
| run: | | |
| flake8 tests/test_model_refiner_active.py tests/test_simulations.py tests/test_simulations_pyprismatic_smoke.py | |
| - name: Run pyprismatic-related tests | |
| shell: bash -l {0} | |
| run: | | |
| pytest -q tests |