Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2824 from ericpre/add_extension_CI_on_label
Run extension test suite from PR
- Loading branch information
Showing
4 changed files
with
95 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: Integration tests | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow: "*" | ||
label: | ||
types: [created] | ||
pull_request_review: | ||
types: [submitted, edited] | ||
|
||
jobs: | ||
integration_test: | ||
if: ${{ github.event.review || github.event.label.name == 'run-extension-tests' }} | ||
name: Extension_${{ matrix.EXTENSION_VERSION }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
EXTENSION_VERSION: ['release', 'dev'] | ||
|
||
env: | ||
MPLBACKEND: agg | ||
EXTENSION: kikuchipy lumispy pyxem atomap | ||
TEST_DEPS: pytest pytest-xdist pytest-rerunfailures pytest-instafail | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: conda-incubator/setup-miniconda@master | ||
with: | ||
miniforge-variant: Mambaforge | ||
miniforge-version: latest | ||
# use base environment, so that when using pip, this is from the | ||
# mambaforge distribution | ||
auto-activate-base: true | ||
activate-environment: "" | ||
|
||
- name: Conda info | ||
run: | | ||
conda info | ||
conda list | ||
- name: Install extensions and Test dependencies | ||
run: | | ||
mamba install hyperspy-base ${{ env.EXTENSION }} ${{ env.TEST_DEPS }} | ||
- name: Conda list | ||
run: | | ||
conda list | ||
- name: Install HyperSpy | ||
run: | | ||
pip install . | ||
- name: Install Extension Dev | ||
if: contains(matrix.EXTENSION_VERSION, 'dev') | ||
run: | | ||
pip install https://github.com/lumispy/lumispy/archive/main.zip | ||
pip install https://github.com/pyxem/kikuchipy/archive/develop.zip | ||
pip install https://github.com/pyxem/pyxem/archive/master.zip | ||
pip install https://https://gitlab.com/atomap/atomap/-/archive/master/atomap-master.zip | ||
- name: Run Kikuchipy Test Suite | ||
if: ${{ always() }} | ||
run: | | ||
python -m pytest --pyargs kikuchipy | ||
- name: Run LumiSpy Test Suite | ||
if: ${{ always() }} | ||
run: | | ||
python -m pytest --pyargs lumispy | ||
- name: Run Pyxem Test Suite | ||
if: ${{ always() }} | ||
run: | | ||
python -m pytest --pyargs pyxem | ||
# atomap test suite doesn't run headless | ||
#- name: Run atomap Test Suite | ||
# if: ${{ always() }} | ||
# run: | | ||
# python -m pytest --pyargs atomap |
This file contains 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 file contains 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 file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add Github workflow to run test suite of extension from a pull request. |