From 088c9d2d53a92bf6c7449cd6fd662f93a08272f4 Mon Sep 17 00:00:00 2001 From: Merca Ovnerud Date: Fri, 13 Oct 2023 17:22:44 +0200 Subject: [PATCH 1/2] Update Codacy configuration and add Codacy badge to README The commit updates the Codacy configuration file by replacing `CODECOV_TOKEN` with `CODACY_PROJECT_TOKEN`. Additionally, it adds a Codacy badge to the README file. --- .github/workflows/codacy.yaml | 2 +- README.md | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codacy.yaml b/.github/workflows/codacy.yaml index 3982312..64a44c4 100644 --- a/.github/workflows/codacy.yaml +++ b/.github/workflows/codacy.yaml @@ -18,4 +18,4 @@ jobs: run: | bash <(curl -Ls https://coverage.codacy.com/get.sh) env: - CODECOV_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} \ No newline at end of file + CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} \ No newline at end of file diff --git a/README.md b/README.md index be88f54..6187b3f 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ ![GitHub issues](https://img.shields.io/github/issues/merca/data-and-stuff) ![GitHub pull requests](https://img.shields.io/github/issues-pr/merca/data-and-stuff) +[![Codacy Badge](https://app.codacy.com/project/badge/Grade/64f70747a98f4a36bc5cbe5ff7fde4ad)](https://app.codacy.com/gh/merca/data-and-stuff/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) @@ -35,17 +36,14 @@ ## 🧐 About - In this repository, you'll find the relics of my expeditions into the uncharted territories of data engineering, architecture, analysis, and science. - ## 🏁 Getting Started To embark upon this quest, ensure your steed (your machine) is equipped with the necessary armaments. ### Prerequisites - Infrastructure is written with Pulumi, so you'll need to install it. ```powershell From d9b1eb5f0daba299bcb366643bc149c401ef9929 Mon Sep 17 00:00:00 2001 From: Merca Ovnerud Date: Fri, 13 Oct 2023 17:27:47 +0200 Subject: [PATCH 2/2] feat: Add dotnet tests and publish test results This commit adds the following changes: - Added setup for dotnet version 8.0.x - Implemented running dotnet tests with code coverage collection - Published test results using EnricoMi/publish-unit-test-result-action - Updated Codacy coverage report command to include the correct file path --- .github/workflows/codacy.yaml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codacy.yaml b/.github/workflows/codacy.yaml index 64a44c4..af1a9f9 100644 --- a/.github/workflows/codacy.yaml +++ b/.github/workflows/codacy.yaml @@ -14,8 +14,24 @@ jobs: checks: write steps: - uses: actions/checkout@v3 + - uses: actions/setup-dotnet@v3 + with: + dotnet-version: 8.0.x + - name: Run dotnet tests + run: | + # Run your tests here + dotnet test ./src --collect:"XPlat Code Coverage" --logger:"trx;LogFilePrefix=testResults;verbosity=detailed" --results-directory ./test-results + mv -v ./test-results/*/*.* ./test-results/ + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action/composite@v2 + id: test-results + if: always() + with: + files: | + test-results/**/*.trx + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Upload coverage reports to Codacy run: | - bash <(curl -Ls https://coverage.codacy.com/get.sh) + bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r ./test-results/coverage.cobertura.xml env: CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} \ No newline at end of file