File tree Expand file tree Collapse file tree 4 files changed +69
-4
lines changed Expand file tree Collapse file tree 4 files changed +69
-4
lines changed Original file line number Diff line number Diff line change
1
+ name : pytest
2
+
3
+ # Triggers the workflow on push for all branches
4
+ on : [push]
5
+
6
+ jobs :
7
+ pytest :
8
+ runs-on : ubuntu-latest
9
+ steps :
10
+ # Check out repo and set up Python
11
+ - name : Check out the repository
12
+ uses : actions/checkout@v4
13
+ with :
14
+ lfs : true
15
+
16
+ # Use cached python and dependencies, install poetry
17
+ - name : " Setup Python, Poetry and Dependencies"
18
+ uses : packetcoders/action-setup-cache-python-poetry@main
19
+ with :
20
+ python-version : 3.8
21
+ poetry-version : 1.2.2
22
+
23
+ # Run pytest with coverage report and upload results to coveralls
24
+ - name : Run tests on python 3.8
25
+ run : |
26
+ poetry run pytest --cov --cov-report xml:cobertura.xml --full-trace --show-capture=no -sv -n auto tests/
27
+
28
+ - name : Coveralls
29
+ uses : coverallsapp/github-action@v2
30
+ with :
31
+ github-token : ${{ secrets.GITHUB_TOKEN }}
32
+ file : ./cobertura.xml
Original file line number Diff line number Diff line change
1
+ name : update docs/requirements.txt for readthedocs
2
+
3
+ on :
4
+ # Triggers the workflow on push but only for the main branch
5
+ # and only for changes to the poetry.lock file
6
+ push :
7
+ branches : [ main ]
8
+ paths : [poetry.lock]
9
+
10
+ jobs :
11
+ pytest :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ # Check out repo and set up Python
15
+ - name : Check out the repository
16
+ uses : actions/checkout@v4
17
+ with :
18
+ lfs : true
19
+
20
+ # Use cached python and dependencies, install poetry
21
+ - name : " Setup Python, Poetry and Dependencies"
22
+ uses : packetcoders/action-setup-cache-python-poetry@main
23
+ with :
24
+ python-version : 3.8
25
+ poetry-version : 1.2.2
26
+
27
+ # Generates and commits a requirements.txt used by readthedocs
28
+ - name : Export requirements.txt
29
+ run : poetry export --without-hashes --format=requirements.txt -o docs/requirements.txt -E docs -E notebook
30
+
31
+ - name : Commit changes
32
+ uses : EndBug/add-and-commit@v9
33
+ with :
34
+ default_author : github_actions
35
+ message : ' Updating requirements for docs'
36
+ add : ' docs/requirements.txt'
Original file line number Diff line number Diff line change @@ -667,6 +667,7 @@ def test_compute():
667
667
metadata ["user0" ]["email" ] = "email"
668
668
# NXinstrument
669
669
metadata ["instrument" ] = {}
670
+ metadata ["instrument" ] = {}
670
671
# analyzer
671
672
metadata ["instrument" ]["analyzer" ] = {}
672
673
metadata ["instrument" ]["analyzer" ]["energy_resolution" ] = 110.0
You can’t perform that action at this time.
0 commit comments