diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 9b2bb4e..d098261 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -10,6 +10,7 @@ on: - develop paths: - 'docs/**' + - '**.py' - '.github/workflows/docs.yaml' # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages @@ -27,6 +28,19 @@ jobs: with: docs-folder: "docs/" build-command: make html dirhtml + - name: Setup Python + uses: actions/setup-python@v4.7.0 + with: + python-version: 3.11 + - name: Install Python dependencies + run: pip install -qr cli/requirements.txt + - name: Generate coverage report + run: | + cd cli + coverage run -m unittest discover + coverage-badge -o coverage.svg + cd .. + sudo mv cli/coverage.svg docs/_build/dirhtml/_images/ - uses: actions/upload-artifact@v3 with: name: Documentation diff --git a/.github/workflows/python-unit-tests.yaml b/.github/workflows/python-unit-tests.yaml index 13a99bb..c99eea0 100644 --- a/.github/workflows/python-unit-tests.yaml +++ b/.github/workflows/python-unit-tests.yaml @@ -33,10 +33,4 @@ jobs: echo "Coverage is less than 65%" exit 1 fi - # Add this - - name: Update Coverage Badge - # GitHub actions: default branch variable - # https://stackoverflow.com/questions/64781462/github-actions-default-branch-variable - if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) - uses: we-cli/coverage-badge-action@main diff --git a/README.md b/README.md index f566990..45ed44f 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ ![tests](https://github.com/ls1intum/Aeolus/actions/workflows/docs.yaml/badge.svg) ![tests](https://github.com/ls1intum/Aeolus/actions/workflows/python-unit-tests.yaml/badge.svg) +![coverage](https://ls1intum.github.io/Aeolus/_images/coverage.svg) ![containers](https://github.com/ls1intum/Aeolus/actions/workflows/build-and-push.yaml/badge.svg) ![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg) -![coverage](https://github.com/ls1intum/Aeolus/badges/coverage.svg) On how to use Aeolus, please refer to the [documentation](https://ls1intum.github.io/Aeolus/). diff --git a/playground/package-lock.json b/playground/package-lock.json index ded2204..47d14e9 100644 --- a/playground/package-lock.json +++ b/playground/package-lock.json @@ -9797,9 +9797,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.4", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", - "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "dev": true, "funding": [ {