Skip to content

Commit 544d742

Browse files
authored
Use diffpy.utils GitHub CI workflows to address codecov 0% problem (#87)
* Move tests folder to top * Revert commit * Add pytest-cov * Use the latest diffpy.utils CI workflow
1 parent b5a0366 commit 544d742

9 files changed

+57
-219
lines changed

Diff for: .github/workflows/check-news-item.yml

+5-25
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,12 @@
1-
name: Check News Item
1+
name: Check for News
22

33
on:
44
pull_request_target:
55
branches:
66
- main
77

8-
permissions:
9-
pull-requests: write
10-
contents: read
11-
128
jobs:
13-
build:
14-
runs-on: ubuntu-latest
15-
name: Check News item
16-
steps:
17-
18-
# note: the checkout will pull code from the base branch. This step should not pull code from the merge commit
19-
- uses: actions/checkout@v4
20-
21-
- name: Setup Python
22-
uses: actions/setup-python@v5
23-
with:
24-
python-version: '3.12'
25-
cache: 'pip'
26-
cache-dependency-path: 'pyproject.toml'
27-
- run: pip install PyGithub
28-
- run: python .github/workflows/check-news.py
29-
env:
30-
PR_NUMBER: "${{ github.event.number }}"
31-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
32-
GITHUB_REPOSITORY: "${{ env.GITHUB_REPOSITORY }}"
9+
check-news-item:
10+
uses: Billingegroup/release-scripts/.github/workflows/_check-news-item.yml@v0
11+
with:
12+
project: diffpy.snmf

Diff for: .github/workflows/check-news.py

-61
This file was deleted.

Diff for: .github/workflows/docs.yml

-59
This file was deleted.

Diff for: .github/workflows/main.yml

-55
This file was deleted.
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
release:
8+
types:
9+
- prereleased
10+
- published
11+
workflow_dispatch:
12+
13+
jobs:
14+
CI:
15+
uses: Billingegroup/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0
16+
with:
17+
project: diffpy.snmf
18+
c_extension: false
19+
headless: false
20+
secrets:
21+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Diff for: .github/workflows/pre-commit.yml

-19
This file was deleted.

Diff for: .github/workflows/publish-docs-on-release.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Build and Deploy Docs
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
workflow_dispatch:
8+
9+
jobs:
10+
publish-docs-on-release:
11+
uses: Billingegroup/release-scripts/.github/workflows/_publish-docs-on-release.yml@v0
12+
with:
13+
project: diffpy.snmf
14+
c_extension: false

Diff for: .github/workflows/tests-on-pr.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Tests on PR
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
workflow_dispatch:
9+
10+
jobs:
11+
tests-on-pr:
12+
uses: Billingegroup/release-scripts/.github/workflows/_tests-on-pr.yml@v0
13+
with:
14+
project: diffpy.snmf
15+
c_extension: false
16+
headless: false

Diff for: requirements/test.txt

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ pytest
33
codecov
44
coverage
55
pytest-env
6+
pytest-cov

0 commit comments

Comments
 (0)