Skip to content

Commit b1a3b87

Browse files
committed
Update docs, main.yml to Aug 11, 2024
1 parent 4c51c55 commit b1a3b87

2 files changed

Lines changed: 19 additions & 10 deletions

File tree

.github/workflows/docs.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,21 @@ jobs:
3838
- name: build documents
3939
run: make -C doc html
4040

41+
- name: Run tests and upload coverage
42+
shell: bash -l {0}
43+
run: |
44+
conda activate test
45+
coverage run -m pytest -vv -s
46+
coverage report -m
47+
codecov
48+
49+
- name: Upload coverage to Codecov
50+
uses: codecov/codecov-action@v4
51+
env:
52+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
53+
4154
- name: Deploy
4255
uses: peaceiris/actions-gh-pages@v4
4356
with:
4457
github_token: ${{ secrets.GITHUB_TOKEN }}
45-
publish_dir: ./doc/build/html
58+
publish_dir: ./doc/build/html

.github/workflows/main.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- CI
78
pull_request:
89
workflow_dispatch:
910

@@ -18,10 +19,9 @@ jobs:
1819
- name: check out diffpy.snmf
1920
uses: actions/checkout@v3
2021
with:
21-
repository: diffpy/diffpy.snmf
22-
# for bookkeeping have diffpy.snmf at the same level as everything else in the
23-
# directory tree
22+
repository: REPO_NAME
2423
path: .
24+
fetch-depth: 0 # avoid shallow clone with no tags
2525

2626
- name: initialize miniconda
2727
# this uses a marketplace action that sets up miniconda in a way that makes
@@ -50,10 +50,6 @@ jobs:
5050
shell: bash -l {0}
5151
run: |
5252
conda activate test
53-
coverage run run_tests.py
53+
coverage run -m pytest -vv -s
5454
coverage report -m
55-
56-
- name: Upload coverage reports to Codecov
57-
uses: codecov/codecov-action@v3
58-
# with:
59-
# token: ${{ secrets.CODECOV_TOKEN }}
55+
codecov

0 commit comments

Comments
 (0)