Skip to content

Commit

Permalink
Merge pull request #88 from Tieqiong/yml
Browse files Browse the repository at this point in the history
update .yml files
  • Loading branch information
sbillinge authored Aug 12, 2024
2 parents 76bf3aa + 86d0c2b commit 4ecd139
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 9 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,21 @@ jobs:
- name: build documents
run: make -C doc html

- name: Run tests and upload coverage
shell: bash -l {0}
run: |
conda activate test
coverage run -m pytest -vv -s
coverage report -m
codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/build/html
11 changes: 3 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,12 @@ jobs:
conda activate test
conda install --file requirements/run.txt
conda install --file requirements/test.txt
pip install -e .
pip install .
- name: Validate diffpy.structure
shell: bash -l {0}
run: |
conda activate test
coverage run -m diffpy.structure.tests.run
coverage run -m pytest -vv -s
coverage report -m
codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
19 changes: 19 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: pre-commit

on:
pull_request:
push:
workflow_dispatch:

jobs:
pre-commit:
# pull requests are a duplicate of a branch push if within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: pre-commit/action@v3.0.0
with:
extra_args: --all-files

0 comments on commit 4ecd139

Please sign in to comment.