Skip to content

1922 live view emit dir structure on load #1455

1922 live view emit dir structure on load

1922 live view emit dir structure on load #1455

Workflow file for this run

name: Testing on Windows
on:
push:
branches:
- 'main'
- 'release-*'
pull_request:
branches:
- 'main'
- 'release-*'
release:
merge_group:
jobs:
test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
# Needed to get tags so that git describe works during package build
fetch-depth: "0"
- name: Get Date
id: get-date
run: |
echo "date=$(/bin/date -u "+%Y%V")" >> $GITHUB_OUTPUT
shell: bash
- name: Cache Mambaforge and Pip packages
uses: actions/[email protected]
env:
CACHE_NUMBER: 0
with:
path: |
~/conda_pkgs_dir
~/.cache/pip
key:
${{runner.os}}-condapkg-${{env.CACHE_NUMBER}}-${{steps.get-date.outputs.date}}-${{hashFiles('environment-dev.yml','conda/meta.yaml')}}
- name: Setup Mambaforge
uses: conda-incubator/[email protected]
with:
miniforge-version: latest
miniforge-variant: Mambaforge
activate-environment: mantidimaging-dev
auto-activate-base: false
use-mamba: true
- name: Cache Mambaforge environment
uses: actions/[email protected]
id: cache-mambaforge-environment
env:
CACHE_NUMBER: 0
with:
path: ${{env.CONDA}}/envs/mantidimaging-dev
key:
${{runner.os}}-condaenv-${{env.CACHE_NUMBER}}-${{steps.get-date.outputs.date}}-${{hashFiles('environment-dev.yml','conda/meta.yaml')}}
- name: Mantid Imaging developer dependencies
if: steps.cache-mambaforge-environment.outputs.cache-hit != 'true'
shell: bash -l {0}
run: |
conda deactivate
python ./setup.py create_dev_env
- name: List versions
shell: bash -l {0}
run: |
mamba env list
python --version; conda list ; pip list
- name: Yapf
shell: bash -l {0}
run: |
yapf --parallel --diff --recursive .
- name: Ruff
shell: bash -l {0}
run: |
ruff .
- name: mypy
shell: bash -l {0}
# COMPAT: applitools has some bad signatures, so use --no-site-packages
run: |
mypy --ignore-missing-imports --no-site-packages mantidimaging
- name: pytest
timeout-minutes: 10
shell: bash -l {0}
run: |
python -m pytest --cov --cov-report=xml -n auto -o log_cli=true --ignore=mantidimaging/eyes_tests --durations=10
- name: Get test data
shell: bash -l {0}
run: |
curl -L https://github.com/mantidproject/mantidimaging-data/archive/refs/tags/small.zip --output small.zip
unzip -q small.zip -d ~
mv ~/mantidimaging-data-small ~/mantidimaging-data
timeout-minutes: 5
- name: GUI Tests System
shell: bash -l {0}
run: |
python -m pytest -vs -rs -p no:xdist -p no:randomly -p no:repeat -p no:cov -o log_cli=true --run-system-tests --durations=10
timeout-minutes: 15
- name: Set display resolution for screenshot tests
run: |
Set-DisplayResolution -Width 1920 -Height 1080 -Force
shell: pwsh
- name: GUI Tests Screenshots Applitools
if: github.event_name == 'pull_request'
shell: bash -l {0}
env:
APPLITOOLS_API_KEY: ${{ secrets.APPLITOOLS_API_KEY }}
APPLITOOLS_BATCH_ID: ${{ github.sha }}
GITHUB_BRANCH_NAME: ${{ github.head_ref }}
run: |
python -m pytest -vs -rs -p no:xdist -p no:randomly -p no:repeat -p no:cov -o log_cli=true mantidimaging/eyes_tests --durations=10
timeout-minutes: 15
# Label as 'windows-build-test' for testing purposes.
# To re-enable, use the if rule from the conda workflow and change label to 'unstable' after testing
- name: publish package
if: github.event_name == 'release' || (github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release')))
uses: ./.github/actions/publish-package
with:
label: unstable
token: ${{ secrets.ANACONDA_API_TOKEN }}