-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: add mirrors-prettier and blacken-docs hooks to .pre-commit-config…
….yaml (#98) * Add CITATION.cff * .pre-commit-config.yaml: add mirrors-prettier and blacken-docs * style: pre-commit fixes * Please blacken-docs * Add -E option to blacken-docs hook * Revert changes to README python blocks Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
7a8e8d9
commit 6fc03aa
Showing
3 changed files
with
109 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,38 +8,37 @@ on: | |
- main | ||
release: | ||
types: | ||
- published | ||
- published | ||
|
||
jobs: | ||
dist: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Build wheel and SDist | ||
run: pipx run build | ||
- name: Build wheel and SDist | ||
run: pipx run build | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: dist/* | ||
|
||
- name: Check metadata | ||
run: pipx run twine check dist/* | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: dist/* | ||
|
||
- name: Check metadata | ||
run: pipx run twine check dist/* | ||
|
||
publish: | ||
needs: [dist] | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
|
||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- uses: pypa/[email protected] | ||
with: | ||
password: ${{ secrets.pypi_password }} | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- uses: pypa/[email protected] | ||
with: | ||
password: ${{ secrets.pypi_password }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,47 +5,46 @@ on: | |
push: | ||
branches: [master] | ||
|
||
|
||
jobs: | ||
pre-commit: | ||
name: Format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
- name: Check manifest | ||
uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --hook-stage manual | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
- name: Check manifest | ||
uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --hook-stage manual | ||
|
||
checks: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: | ||
- "3.7" | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
- "3.11-dev" | ||
- "3.7" | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
- "3.11-dev" | ||
|
||
name: Check Python ${{ matrix.python-version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install package | ||
run: python -m pip install -e .[test] | ||
- name: Install package | ||
run: python -m pip install -e .[test] | ||
|
||
- name: Test package | ||
run: python -m pytest --doctest-modules --cov=src/hepunits --cov-report=xml | ||
- name: Test package | ||
run: python -m pytest --doctest-modules --cov=src/hepunits --cov-report=xml | ||
|
||
- name: Test coverage with Codecov | ||
uses: codecov/codecov-action@v3 | ||
- name: Test coverage with Codecov | ||
uses: codecov/codecov-action@v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters