more coverage for unit tests #28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy DocFX to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - master | |
| permissions: | |
| actions: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| publish-docs: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Dotnet Setup | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.x | |
| - run: dotnet tool update -g docfx | |
| - run: dotnet tool install -g dotnet-reportgenerator-globaltool | |
| - name: Run tests with coverage | |
| run: dotnet test ItalianFiscalKit.slnx -c Release --collect:"XPlat Code Coverage" --results-directory ./coverage-results -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=cobertura | |
| - name: Generate HTML coverage report | |
| run: reportgenerator "-reports:coverage-results/**/coverage.cobertura.xml" "-targetdir:coverage" "-reporttypes:Html" "-title:ItalianFiscalKit Coverage" | |
| - run: docfx docfx.json | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: '_site' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |