-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #218 from halomod/warnings-tests
Warnings tests
- Loading branch information
Showing
45 changed files
with
428 additions
and
437 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
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Check Distribution Build | ||
|
||
on: push | ||
|
||
jobs: | ||
check-build: | ||
name: Twine Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install Build Tools | ||
run: pip install build twine | ||
|
||
- name: Build a binary wheel | ||
run: | | ||
python -m build . | ||
- name: Check Distribution | ||
run: | | ||
twine check dist/* |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,42 +1,30 @@ | ||
name: Deploy to PyPI | ||
name: Publish Python distributions to PyPI | ||
|
||
on: push | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build-n-publish: | ||
name: Deploy | ||
runs-on: ubuntu-22.04 | ||
name: Make Release on PyPI and Github | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
# https://github.com/ansible/pylibssh/blob/1e7b17f/.github/workflows/build-test-n-publish.yml#L146-L151 | ||
- name: Get history and tags for SCM versioning to work | ||
run: | | ||
git fetch --prune --unshallow | ||
git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
git describe --tags | ||
git describe --tags $(git rev-list --tags --max-count=1) | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Install pep517 | ||
run: | | ||
python -m pip install pep517 --user | ||
python -m pip install setuptools_scm | ||
python setup.py --version | ||
- name: Create setuptools_scm env variable | ||
if: startsWith(github.ref, 'refs/tags/') != true | ||
shell: bash | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
|
||
- name: Install Build Tools | ||
run: pip install build | ||
|
||
- name: Build a binary wheel | ||
run: | | ||
wget https://gist.github.com/plaplant/0902f09e59166bac742bbd554f3cd2f9/raw/make_dev_version.sh -O ../make_dev_version.sh | ||
version=$(bash ../make_dev_version.sh) | ||
echo "SETUPTOOLS_SCM_PRETEND_VERSION=$version" >> $GITHUB_ENV | ||
- name: Build a binary wheel and a source tarball | ||
run: python -m pep517.build --binary --source --out-dir dist . | ||
# deploy to actual PyPI only when a tag is pushed (which should happen only | ||
# automatically on master) | ||
- name: Publish distribution 📦 to PyPI | ||
if: startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
python -m build . | ||
- name: Publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.pypi_password }} |
This file was deleted.
Oops, something went wrong.
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,12 +5,9 @@ name: Tests | |
# Also, only test on pull requests into master/dev. | ||
on: | ||
push: | ||
tags-ignore: | ||
- 'v*' | ||
pull_request: | ||
branches: | ||
- 'master' | ||
- 'dev' | ||
- 'main' | ||
|
||
jobs: | ||
tests: | ||
|
@@ -34,8 +31,11 @@ jobs: | |
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Setup GNU Fortran | ||
uses: modflowpy/[email protected] | ||
- uses: fortran-lang/setup-fortran@v1 | ||
id: setup-fortran | ||
with: | ||
compiler: gcc | ||
version: 13 | ||
- name: Install | ||
run: pip install .[dev] | ||
- name: Run Tests | ||
|
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Warnings Tests | ||
|
||
# Test on all pushes, except when the push is literally just a tag (because we | ||
# tag automatically via CI, and therefore there's no extra code in that push). | ||
# Also, only test on pull requests into master/dev. | ||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
tests: | ||
env: | ||
ENV_NAME: tests | ||
PYTHON: ${{ matrix.python-version }} | ||
OS: ${{ matrix.os }} | ||
name: Testing | ||
# needs: [linter] | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ["3.11"] | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: 1 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- uses: fortran-lang/setup-fortran@v1 | ||
id: setup-fortran | ||
with: | ||
compiler: gcc | ||
version: 13 | ||
- name: Install | ||
run: pip install .[dev] | ||
- name: Run Tests | ||
run: | | ||
python -m pytest -Werror --cov=hmf --cov-config=.coveragerc --cov-report xml:./coverage.xml --durations=25 | ||
- uses: codecov/codecov-action@v3 | ||
if: matrix.os == 'ubuntu-latest' && success() | ||
with: | ||
file: ./coverage.xml # optional | ||
fail_ci_if_error: true | ||
verbose: true | ||
token: ${{ secrets.CODECOV_TOKEN }} |
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
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.