diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..3dbfbb4 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,2 @@ +[run] +omit = tests/* \ No newline at end of file diff --git a/.devcontainer/build.sh b/.devcontainer/build.sh index 6625ef5..27fe8ae 100755 --- a/.devcontainer/build.sh +++ b/.devcontainer/build.sh @@ -8,7 +8,7 @@ rm /omd/sites/cmk/var/check_mk/packages/${NAME} \ mkp -v package package -rm $NAME-$VERSION.mkp +rm $NAME-$VERSION.mkp ||: cp /omd/sites/cmk/var/check_mk/packages_local/$NAME-$VERSION.mkp . mkp inspect $NAME-$VERSION.mkp diff --git a/.devcontainer/requirements.txt b/.devcontainer/requirements.txt index c248ac1..239569d 100644 --- a/.devcontainer/requirements.txt +++ b/.devcontainer/requirements.txt @@ -1,4 +1,6 @@ flake8 pytest pytest-cov +pytest-md +pytest-emoji requests-mock \ No newline at end of file diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index b00bf54..572ff11 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -28,4 +28,8 @@ jobs: - name: Install pytest run: su -l -c "REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt pip3 install -r $GITHUB_WORKSPACE/.devcontainer/requirements.txt" cmk - name: Run pytest - run: su -l -c "python3 -m pytest" cmk \ No newline at end of file + run: | + REPORT="$(mktemp)" + chown -R cmk:cmk $GITHUB_WORKSPACE $REPORT + su -l -c "cd $GITHUB_WORKSPACE; python3 -m pytest -v --emoji -cov . --md $REPORT " cmk + cat $REPORT > $GITHUB_STEP_SUMMARY