Skip to content

bug: upgrade pygrib version from 2.1.6 to 2.1.8 #618

bug: upgrade pygrib version from 2.1.6 to 2.1.8

bug: upgrade pygrib version from 2.1.6 to 2.1.8 #618

Workflow file for this run

name: Run Pytest
on:
push:
branches:
- "main"
pull_request:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest_httpserver requests==2.32.5 pylint==2.17.5 python-dateutil==2.9.0 pint==0.21 importlib-metadata==6.7.0 jsonschema==4.19.0 pika==1.3.1 pyproj==3.7.2 numpy==1.26.4 shapely==2.1.2 netcdf4==1.7.3 h5netcdf==1.8.1 h5py==3.15.1 pillow==10.2.0 python-logging-rabbitmq==2.3.0 pytest-cov==4.1.0
- name: Set PYTHONPATH for pytest
run: |
echo "PYTHONPATH=python/idsse_common/idsse/common" >> $GITHUB_ENV
- name: Checkout idss-engine-commons
uses: actions/checkout@v3
with:
repository: NOAA-GSL/idss-engine-commons
path: commons/
# - name: Install IDSSE python commons
# working-directory: commons/python/idsse_common
# run: pip install .
- name: Checkout idsse-testing
uses: actions/checkout@v3
with:
repository: NOAA-GSL/idsse-testing
ref: main
path: testing/
- name: Install IDSSE python testing
working-directory: testing/python
run: pip install .
- name: Test with pytest
working-directory: python/idsse_common
# run Pytest, exiting nonzero if pytest throws errors (otherwise "| tee" obfuscates)
run: |
set -o pipefail;
pytest ./test --cov=./idsse/common --cov-report=term --junitxml=./test/pytest.xml | tee ./test/coverage.txt;
- name: Pytest coverage comment
if: ${{ github.ref == 'refs/heads/main' }}
id: coverageComment
uses: MishaKav/pytest-coverage-comment@main
with:
hide-comment: true
pytest-coverage-path: python/idsse_common/test/coverage.txt
- name: Update Readme with Coverage Html
if: ${{ github.ref == 'refs/heads/main' }}
run: |
sed -i '/<!-- Pytest Coverage Comment:Begin -->/,/<!-- Pytest Coverage Comment:End -->/c\<!-- Pytest Coverage Comment:Begin -->\n\${{ steps.coverageComment.outputs.coverageHtml }}\n<!-- Pytest Coverage Comment:End -->' ./README.md
- name: Commit & Push changes to Readme
if: ${{ github.ref == 'refs/heads/main' }}
uses: actions-js/push@master
with:
message: Update coverage on Readme
github_token: ${{ secrets.GITHUB_TOKEN }}