Skip to content

Commit

Permalink
removed test with conda and removed twine as dev dep
Browse files Browse the repository at this point in the history
  • Loading branch information
hechth committed Nov 5, 2024
1 parent 70ec42d commit 8198a0a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 83 deletions.
78 changes: 0 additions & 78 deletions .github/workflows/CI_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,81 +118,3 @@ jobs:
- name: Run tests
run: |
poetry run pytest
test_with_conda:
name: Anaconda build and test documentation
runs-on: ubuntu-latest
needs: first_check
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"
- name: Create conda environment
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: '3.10'
- name: Show conda config
shell: bash -l {0}
run: |
conda info
conda list
conda config --show-sources
conda config --show
conda env list
- name: Python info
shell: bash -l {0}
run: |
which python
python --version
- name: Show environment variables
shell: bash -l {0}
run: |
env | sort
- name: Install conda dependencies
shell: bash -l {0}
run: |
conda install -c conda-forge poetry
- name: Install with development dependencies
shell: bash -l {0}
run: |
python -m pip install --upgrade pip
poetry install --with dev,docs
- name: Build documentation
shell: bash -l {0}
run: |
make coverage doctest html
working-directory: readthedocs/
env:
SPHINXOPTS: "-n" # enable nit-picky mode
- name: Check documentation coverage threshold
run: |
cat readthedocs/_build/coverage/python.txt
UNCOVERED_MEMBERS=$(grep '*' readthedocs/_build/coverage/python.txt | wc -l)
UNCOVERED_MEMBERS_ALLOWED=10
if (( $UNCOVERED_MEMBERS > $UNCOVERED_MEMBERS_ALLOWED )) ; then echo "There are currently ${UNCOVERED_MEMBERS} uncovered members in the documentation, which is more than the ${UNCOVERED_MEMBERS_ALLOWED} allowed." && exit 1;fi
echo "The code is sufficiently documented with ${UNCOVERED_MEMBERS} uncovered members out of ${UNCOVERED_MEMBERS_ALLOWED} allowed.";
- name: Test with coverage
shell: bash -l {0}
run: |
poetry run pytest --cov --cov-report term --cov-report xml --junitxml=xunit-result.xml
- name: Correct coverage paths
run: sed -i "s+$PWD/++g" coverage.xml
- name: Store PR metadata in json file
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
HEAD_REF: ${{ github.event.pull_request.head.ref }}
BASE_REF: ${{ github.event.pull_request.base.ref }}
run: |
jq -n --arg pr_number "$PR_NUMBER"\
--arg head_ref "$HEAD_REF"\
--arg base_ref "$BASE_REF"\
'{"pr_number": $pr_number, "head_ref": $head_ref, "base_ref": $base_ref}' > pr_metadata.json
- uses: actions/upload-artifact@v4
with:
name: sonarcloud-data-conda
path: |
coverage.xml
xunit-result.xml
pr_metadata.json
10 changes: 5 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8198a0a

Please sign in to comment.