diff --git a/.github/workflows/codacy-coverage-reporter.yml b/.github/workflows/codacy-coverage-reporter.yml new file mode 100644 index 0000000..ba4d0c7 --- /dev/null +++ b/.github/workflows/codacy-coverage-reporter.yml @@ -0,0 +1,29 @@ +name: codacy-coverage-reporter + +on: ["push"] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install Python + uses: actions/setup-python@master + with: + python-version: 3.8 + - name: Setup Poetry Environment + run: | + curl -sSL https://install.python-poetry.org | python3 - + poetry install + - name: Run tests + run: | + poetry run coverage run -m pytest . + - name: Generate Coverage Report + run: | + poetry run coverage report -m + poetry run coverage xml + - name: Upload Coverage Report to Codacy + uses: codacy/codacy-coverage-reporter-action@v1 + with: + project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} + coverage-reports: coverage.xml