Skip to content

Add the ability to use Local Mantid Build for SNAPRed #143

Add the ability to use Local Mantid Build for SNAPRed

Add the ability to use Local Mantid Build for SNAPRed #143

Workflow file for this run

name: unit-test
on:
workflow_dispatch:
pull_request:
push:
branches: [next, qa, main]
tags: ['v*']
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- uses: prefix-dev/[email protected]
with:
pixi-version: v0.41.4
manifest-path: pyproject.toml
- name: Apt install deps
run: |
sudo apt update
sudo apt-get install xvfb
- name: Start xvfb daemon
run: |
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16
- name: run unit tests
run: |
echo "running unit tests"
xvfb-run --server-args="-screen 0 1280x1024x16" -a pixi run test
- name: List coverage files (debug)
run: |
echo "Coverage files generated:"
ls -la coverage.xml || echo "No coverage.xml found"
ls -la .coverage || echo "No .coverage found"
- name: upload coverage to codecov
uses: codecov/codecov-action@v5
if: github.actor != 'dependabot[bot]'
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
verbose: true
integration-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
lfs: true
fetch-depth: 0
fetch-tags: true
- uses: prefix-dev/[email protected]
with:
pixi-version: v0.41.4
manifest-path: pyproject.toml
- name: Install system dependencies
run: |
sudo apt update
sudo apt-get install -y xvfb
- name: Test with pytest
run: |
env=tests/resources/integration_test xvfb-run --server-args="-screen 0 1280x1024x16" -a pixi run test-integration
- name: Upload coverage reports
uses: codecov/codecov-action@v5
if: github.actor != 'dependabot[bot]'
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: integration
name: codecov-integration
fail_ci_if_error: false
verbose: true
gui-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
pixi-version: v0.41.4
manifest-path: pyproject.toml
- name: Apt install deps
run: |
sudo apt update
sudo apt-get install xvfb
- name: Start xvfb daemon
run: |
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16
- name: Gui tests
run: |
env=tests/resources/headcheck.yml xvfb-run --server-args="-screen 0 1280x1024x16" --auto-servernum pixi run snapred --headcheck