Skip to content

Commit

Permalink
Separate tests into two jobs
Browse files Browse the repository at this point in the history
Split analysis and calibration tests into two
different jobs.
Specified paths on which each job triggers execution
  • Loading branch information
GuiMacielPereira committed Jul 8, 2024
1 parent 5910398 commit ad6e028
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: mvesuvio pull request workflow

on: push
on:
push:
paths:
- 'src/**'

jobs:

test:
runs-on: self-hosted
defaults:
Expand Down Expand Up @@ -42,15 +46,6 @@ jobs:
run: |
python -m unittest discover -s ./tests/analysis/system
- name: Run mvesuvio Calibration Unit Tests
run: |
export MANTIDPROPERTIES=$(pwd)/Mantid.user.properties
python -m unittest discover -s ./tests/calibration/unit
- name: Run Vesuvio Calibration System Tests
run: |
python -m unittest discover -s ./tests/calibration/system
# Report coverage
#- name: Report Coverage
# run: coverage report
49 changes: 49 additions & 0 deletions .github/workflows/pr_calibration_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: mvesuvio pull request workflow

on:
push:
paths:
- 'tools/calibration_scripts/**'

jobs:

test:
runs-on: self-hosted
defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

# Set up conda environnment
- name: Setup Miniconda
uses: conda-incubator/[email protected]
with:
miniforge-version: latest
miniforge-variant: Mambaforge
activate-environment: vesuvio-env
environment-file: environment.yml
auto-activate-base: false

- name: Flake8
run: python -m flake8 --config=config.flake8

# Remove `export MANTIDPROPERTIES=$(pwd)/Mantid.user.properties` when updated to mantid > 6.8.0
- name: Install mvesuvio package
run: pip install .

- name: Run mvesuvio Calibration Unit Tests
run: |
export MANTIDPROPERTIES=$(pwd)/Mantid.user.properties
python -m unittest discover -s ./tests/calibration/unit
- name: Run Vesuvio Calibration System Tests
run: |
python -m unittest discover -s ./tests/calibration/system
# Report coverage
#- name: Report Coverage
# run: coverage report

0 comments on commit ad6e028

Please sign in to comment.