File tree Expand file tree Collapse file tree 3 files changed +35
-12
lines changed
actions/publish-pypi-package Expand file tree Collapse file tree 3 files changed +35
-12
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,26 @@ runs:
14
14
shell : bash -l {0}
15
15
run : |
16
16
conda config --set always_yes yes --set changeps1 no
17
- conda create -n build-env-pypi python=3.10.*
18
- conda activate build-env-pypi
19
- mamba install -c conda-forge python-build twine
17
+ conda create -n build-env-pypi -c conda-forge python=3.10.* python-build twine
20
18
21
19
- name : Build package
22
20
shell : bash -l {0}
23
21
run : |
24
22
conda activate build-env-pypi
25
23
python -m build
24
+ conda deactivate
25
+
26
+ - name : Test basic functunality of mvesuvio
27
+ shell : bash -l {0}
28
+ run : |
29
+ mamba create -n mvesuvio-test
30
+ conda activate mvesuvio-test
31
+ pip install dist/*.whl
32
+ mvesuvio config
33
+ conda deactivate
34
+
35
+ - name : Upload to PyPI
36
+ shell : bash -l {0}
37
+ run : |
38
+ conda activate build-env-pypi
26
39
twine upload -u __token__ -p ${{ inputs.token }} dist/*
Original file line number Diff line number Diff line change 1
1
name : Deploy mvesuvio nightly
2
2
3
- on :
4
- workflow_run :
5
- workflows : ["mvesuvio nightly build"]
6
- branches : [main]
7
- types :
8
- - completed
3
+ on : push
4
+ # workflow_run:
5
+ # workflows: ["mvesuvio nightly build"]
6
+ # branches: [main]
7
+ # types:
8
+ # - completed
9
9
10
10
jobs :
11
11
build_conda_and_upload :
24
24
- name : Check for changes since last build
25
25
run : |
26
26
echo "recentCommits=$(test -z $(git log --since="yesterday" -1 --format=%h) && echo false || echo true)" >> $GITHUB_ENV
27
+
27
28
- name : Setup Miniconda
28
- if : ${{ env.recentCommits == 'true'}}
29
+ # if: ${{ env.recentCommits == 'true'}}
29
30
uses : conda-incubator/setup-miniconda@v2.2.0
30
31
with :
31
32
miniforge-version : latest
@@ -35,14 +36,14 @@ jobs:
35
36
auto-activate-base : false
36
37
37
38
- name : Build mvesuvio nightly conda package
38
- if : ${{ env.recentCommits == 'true'}}
39
+ # if: ${{ env.recentCommits == 'true'}}
39
40
uses : ./.github/actions/publish-conda-package
40
41
with :
41
42
label : nightly
42
43
token : ${{ secrets.ANACONDA_API_TOKEN }}
43
44
44
45
- name : Build mvesuvio nightly PyPI package
45
- if : ${{ env.recentCommits == 'true'}}
46
+ # if: ${{ env.recentCommits == 'true'}}
46
47
uses : ./.github/actions/publish-pypi-package
47
48
with :
48
49
token : ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change @@ -34,6 +34,15 @@ requirements:
34
34
test :
35
35
imports :
36
36
- mvesuvio
37
+ requires :
38
+ - pytest
39
+ - mock
40
+ source_files :
41
+ - tests/unit/
42
+ - tools/
43
+ commands :
44
+ - pytest
45
+ - mvesuvio config
37
46
38
47
about :
39
48
home : https://github.com/mantidproject/vesuvio
You can’t perform that action at this time.
0 commit comments