File tree Expand file tree Collapse file tree 3 files changed +36
-9
lines changed Expand file tree Collapse file tree 3 files changed +36
-9
lines changed Original file line number Diff line number Diff line change 36
36
- name : build documents
37
37
run : make -C doc html
38
38
39
+ - name : Run tests and upload coverage
40
+ shell : bash -l {0}
41
+ run : |
42
+ conda activate test
43
+ coverage run -m pytest -vv -s
44
+ coverage report -m
45
+ codecov
46
+
47
+ - name : Upload coverage to Codecov
48
+ uses : codecov/codecov-action@v4
49
+ env :
50
+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
51
+
39
52
- name : Deploy
40
- uses : peaceiris/actions-gh-pages@v3
53
+ uses : peaceiris/actions-gh-pages@v4
41
54
with :
42
55
github_token : ${{ secrets.GITHUB_TOKEN }}
43
56
publish_dir : ./doc/build/html
Original file line number Diff line number Diff line change @@ -44,17 +44,12 @@ jobs:
44
44
conda activate test
45
45
conda install --file requirements/run.txt
46
46
conda install --file requirements/test.txt
47
- pip install -e .
48
-
47
+ pip install .
48
+
49
49
- name : Validate diffpy.structure
50
50
shell : bash -l {0}
51
51
run : |
52
52
conda activate test
53
- coverage run -m diffpy.structure.tests.run
53
+ coverage run -m pytest -vv -s
54
54
coverage report -m
55
55
codecov
56
-
57
- - name : Upload coverage to Codecov
58
- uses : codecov/codecov-action@v4
59
- env :
60
- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change
1
+ name : pre-commit
2
+
3
+ on :
4
+ pull_request :
5
+ push :
6
+ workflow_dispatch :
7
+
8
+ jobs :
9
+ pre-commit :
10
+ # pull requests are a duplicate of a branch push if within the same repo.
11
+ if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
12
+
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - uses : actions/checkout@v3
16
+ - uses : actions/setup-python@v4
17
+ -
uses :
pre-commit/[email protected]
18
+ with :
19
+ extra_args : --all-files
You can’t perform that action at this time.
0 commit comments