-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
1,140 additions
and
639 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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Update Coverage Badge | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
update-readme: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install dependencies | ||
run: | | ||
cd webservice | ||
python -m pip install --upgrade pip | ||
apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends libpq-dev gcc libc6-dev gpg git | ||
pip install -r requirements.txt | ||
- name: Run tests with coverage | ||
run: | | ||
cd webservice | ||
coverage run -m pytest tests/test_app.py | ||
- name: Generate coverage badge | ||
run: | | ||
cd webservice | ||
rm -f coverage.svg # Remove any existing coverage.svg file | ||
coverage-badge -o coverage.svg | ||
- name: Prepend badge to README | ||
run: | | ||
cd webservice | ||
echo "" > temp_readme.md # Create a temporary file | ||
echo "# EIDA statistics webservice" >> temp_readme.md # Restore the title | ||
echo "" >> temp_readme.md # Add a blank line for spacing | ||
echo "[![Coverage Status](coverage.svg)](./coverage.svg)" >> temp_readme.md # Append the badge | ||
sed '1,4d' README.md >> temp_readme.md # Append the rest of README.md | ||
mv temp_readme.md README.md # Replace README.md with the modified temp file | ||
- name: Commit and push changes | ||
run: | | ||
git config --local user.email "action@github.com" | ||
git config --local user.name "GitHub Action" | ||
git add README.md webservice/coverage.svg | ||
git commit -m "Add coverage badge to README" -a || true # Continue even if nothing to commit | ||
git push |
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,3 +5,4 @@ htmlcov | |
*/__pycache__ | ||
/backend_database/Pipfile | ||
/backend_database/yoyo.ini | ||
.coverage |
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
Large diffs are not rendered by default.
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
Large diffs are not rendered by default.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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,59 +1,65 @@ | ||
attrs==23.1.0 | ||
beautifulsoup4==4.12.2 | ||
certifi==2023.11.17 | ||
charset-normalizer==3.3.2 | ||
datetime==5.3 | ||
exceptiongroup==1.2.0; python_version < '3.11' | ||
git+https://github.com/vpet98/pyramid_openapi3#egg=pyramid-openapi3 | ||
greenlet==3.0.1; platform_machine == 'aarch64' or (platform_machine == 'ppc64le' or (platform_machine == 'x86_64' or (platform_machine == 'amd64' or (platform_machine == 'AMD64' or (platform_machine == 'win32' or platform_machine == 'WIN32'))))) | ||
hupper==1.12 | ||
idna==3.4 | ||
iniconfig==2.0.0 | ||
-i https://pypi.org/simple | ||
attrs==23.2.0; python_version >= '3.7' | ||
beautifulsoup4==4.12.3; python_full_version >= '3.6.0' | ||
certifi==2024.6.2; python_version >= '3.6' | ||
charset-normalizer==3.3.2; python_full_version >= '3.7.0' | ||
coverage==7.5.4; python_version >= '3.8' | ||
coverage-badge==1.1.1 | ||
datetime==5.5; python_version >= '3.7' | ||
exceptiongroup==1.2.1; python_version < '3.11' | ||
greenlet==3.0.3; python_version < '3.13' and platform_machine == 'aarch64' or (platform_machine == 'ppc64le' or (platform_machine == 'x86_64' or (platform_machine == 'amd64' or (platform_machine == 'AMD64' or (platform_machine == 'win32' or platform_machine == 'WIN32'))))) | ||
hupper==1.12.1; python_version >= '3.7' | ||
idna==3.7; python_version >= '3.5' | ||
iniconfig==2.0.0; python_version >= '3.7' | ||
isodate==0.6.1 | ||
jsonschema-spec==0.1.6 | ||
jsonschema==4.17.3 | ||
lazy-object-proxy==1.9.0 | ||
markupsafe==2.1.3 | ||
mirakuru==2.5.2 | ||
mmh3==4.0.1 | ||
more-itertools==10.1.0 | ||
numpy==1.23.0 | ||
openapi-core==0.16.5 | ||
openapi-schema-validator==0.4.4 | ||
openapi-spec-validator==0.5.7 | ||
packaging==23.2 | ||
parse==1.19.1 | ||
pastedeploy==3.1.0 | ||
pathable==0.4.3 | ||
plaster-pastedeploy==1.0.1 | ||
plaster==1.1.2 | ||
pluggy==1.3.0 | ||
port-for==0.7.2 | ||
psutil==5.9.6; sys_platform != 'cygwin' | ||
psycopg2-binary==2.9.9 | ||
psycopg==3.1.13 | ||
pyramid==2.0.2 | ||
pyrsistent==0.20.0 | ||
pytest-postgresql==5.0.0 | ||
pytest==7.4.3 | ||
python-gnupg==0.5.1 | ||
jsonschema==4.22.0; python_version >= '3.8' | ||
jsonschema-path==0.3.3; python_full_version >= '3.8.0' and python_full_version < '4.0.0' | ||
jsonschema-specifications==2023.12.1; python_version >= '3.8' | ||
lazy-object-proxy==1.10.0; python_version >= '3.8' | ||
markupsafe==2.1.5; python_version >= '3.7' | ||
mirakuru==2.5.2; python_version >= '3.8' | ||
mmh3==4.1.0 | ||
more-itertools==10.3.0; python_version >= '3.8' | ||
numpy==1.23.0; python_version >= '3.8' | ||
openapi-core==0.19.2; python_full_version >= '3.8.0' and python_full_version < '4.0.0' | ||
openapi-schema-validator==0.6.2; python_full_version >= '3.8.0' and python_full_version < '4.0.0' | ||
openapi-spec-validator==0.7.1; python_full_version >= '3.8.0' and python_full_version < '4.0.0' | ||
packaging==24.1; python_version >= '3.8' | ||
parse==1.20.2 | ||
pastedeploy==3.1.0; python_version >= '3.7' | ||
pathable==0.4.3; python_full_version >= '3.7.0' and python_full_version < '4.0.0' | ||
plaster==1.1.2; python_version >= '3.7' | ||
plaster-pastedeploy==1.0.1; python_version >= '3.7' | ||
pluggy==1.5.0; python_version >= '3.8' | ||
port-for==0.7.2; python_version >= '3.8' | ||
psutil==6.0.0; sys_platform != 'cygwin' | ||
psycopg==3.1.19; python_version >= '3.7' | ||
psycopg2-binary==2.9.9; python_version >= '3.7' | ||
pyramid==2.0.2; python_version >= '3.6' | ||
pyramid-openapi3==0.19; python_version >= '3.10' and python_version < '4.0' | ||
pytest==8.2.2; python_version >= '3.8' | ||
pytest-postgresql==6.0.0; python_version >= '3.8' | ||
python-gnupg==0.5.2 | ||
python-hll==0.1.3 | ||
pytz==2023.3.post1 | ||
pyyaml==6.0.1 | ||
requests==2.31.0 | ||
rfc3339-validator==0.1.4 | ||
sentry-sdk==1.36.0 | ||
six==1.16.0 | ||
soupsieve==2.5 | ||
sqlalchemy==2.0.23 | ||
pytz==2024.1 | ||
pyyaml==6.0.1; python_version >= '3.6' | ||
referencing==0.35.1; python_version >= '3.8' | ||
requests==2.32.3; python_version >= '3.8' | ||
rfc3339-validator==0.1.4; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' | ||
rpds-py==0.18.1; python_version >= '3.8' | ||
sentry-sdk==2.7.1; python_version >= '3.6' | ||
setuptools==70.1.1; python_version >= '3.8' | ||
six==1.16.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' | ||
soupsieve==2.5; python_version >= '3.8' | ||
sqlalchemy==2.0.31; python_version >= '3.7' | ||
tomli==2.0.1; python_version < '3.11' | ||
translationstring==1.4 | ||
typing-extensions==4.8.0 | ||
urllib3==2.1.0 | ||
venusian==3.1.0 | ||
waitress==2.1.2 | ||
webob==1.8.7 | ||
webtest==3.0.0 | ||
werkzeug==3.0.1 | ||
zope.deprecation==5.0 | ||
zope.interface==6.1 | ||
typing-extensions==4.12.2; python_version >= '3.8' | ||
urllib3==2.2.2; python_version >= '3.8' | ||
venusian==3.1.0; python_version >= '3.7' | ||
waitress==3.0.0; python_full_version >= '3.8.0' | ||
webob==1.8.7; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' | ||
webtest==3.0.0; python_version >= '3.6' and python_version < '4' | ||
werkzeug==3.0.3; python_version >= '3.8' | ||
zope.deprecation==5.0; python_version >= '3.7' | ||
zope.interface==6.4.post2; python_version >= '3.7' |
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