|
16 | 16 |
|
17 | 17 | permissions: |
18 | 18 | contents: read |
| 19 | + pull-requests: write |
| 20 | + checks: write |
19 | 21 |
|
20 | 22 | jobs: |
21 | 23 | test: |
|
30 | 32 | 3.1.x |
31 | 33 | 10.0.x |
32 | 34 |
|
| 35 | + - uses: actions/setup-node@v6 |
| 36 | + with: |
| 37 | + node-version: '20.x' |
| 38 | + |
33 | 39 | - name: 'Restore packages' |
34 | 40 | run: | |
35 | 41 | dotnet restore ${{ env.SOLUTION_PATH }} |
@@ -63,27 +69,41 @@ jobs: |
63 | 69 |
|
64 | 70 | - name: 'Run tests' |
65 | 71 | run: | |
66 | | - dotnet test ./tests/Allure.Net.Commons.Tests\ |
| 72 | + npx -y allure@3 run --config ./.allurerc.mjs --rerun 2 --environment="${{ env.BUILD_CONFIGURATION }}" --dump="allure-results-commons" -- dotnet test ./tests/Allure.Net.Commons.Tests\ |
67 | 73 | --no-restore\ |
68 | 74 | --no-build\ |
69 | 75 | --configuration ${{ env.BUILD_CONFIGURATION }} |
70 | | - dotnet run --project ./tests/Allure.TestingPlatform.Tests\ |
| 76 | + npx -y allure@3 run --config ./.allurerc.mjs --rerun 2 --environment="${{ env.BUILD_CONFIGURATION }}" --dump="allure-results-testing-platform" -- dotnet run --project ./tests/Allure.TestingPlatform.Tests\ |
71 | 77 | --no-restore\ |
72 | 78 | --no-build\ |
73 | 79 | --configuration ${{ env.BUILD_CONFIGURATION }} |
74 | | - dotnet run --project ./tests/Allure.NUnit.Tests\ |
| 80 | + npx -y allure@3 run --config ./.allurerc.mjs --rerun 2 --environment="${{ env.BUILD_CONFIGURATION }}" --dump="allure-results-nunit" -- dotnet run --project ./tests/Allure.NUnit.Tests\ |
75 | 81 | --no-restore\ |
76 | 82 | --no-build\ |
77 | 83 | --configuration ${{ env.BUILD_CONFIGURATION }} |
78 | | - dotnet run --project ./tests/Allure.Xunit.Tests\ |
| 84 | + npx -y allure@3 run --config ./.allurerc.mjs --rerun 2 --environment="${{ env.BUILD_CONFIGURATION }}" --dump="allure-results-xunit" -- dotnet run --project ./tests/Allure.Xunit.Tests\ |
79 | 85 | --no-restore\ |
80 | 86 | --no-build\ |
81 | 87 | --configuration ${{ env.BUILD_CONFIGURATION }} |
82 | | - dotnet test ./tests/Allure.SpecFlow.Tests\ |
| 88 | + npx -y allure@3 run --config ./.allurerc.mjs --rerun 2 --environment="${{ env.BUILD_CONFIGURATION }}" --dump="allure-results-specflow" -- dotnet test ./tests/Allure.SpecFlow.Tests\ |
83 | 89 | --no-restore\ |
84 | 90 | --no-build\ |
85 | 91 | --configuration ${{ env.BUILD_CONFIGURATION }} |
86 | | - dotnet test ./tests/Allure.Reqnroll.Tests\ |
| 92 | + npx -y allure@3 run --config ./.allurerc.mjs --rerun 2 --environment="${{ env.BUILD_CONFIGURATION }}" --dump="allure-results-reqnroll" -- dotnet test ./tests/Allure.Reqnroll.Tests\ |
87 | 93 | --no-restore\ |
88 | 94 | --no-build\ |
89 | 95 | --configuration ${{ env.BUILD_CONFIGURATION }} |
| 96 | +
|
| 97 | + - name: Generate Allure report |
| 98 | + env: |
| 99 | + ALLURE_TOKEN: ${{ secrets.ALLURE_TOKEN }} |
| 100 | + ALLURE_ENDPOINT: ${{ secrets.ALLURE_ENDPOINT }} |
| 101 | + ALLURE_PROJECT_ID: ${{ secrets.ALLURE_PROJECT_ID }} |
| 102 | + run: npx -y allure@3 generate --config ./.allurerc.mjs --dump="allure-results-*.zip" --output=./out/allure-report |
| 103 | + |
| 104 | + - name: Post Allure summary |
| 105 | + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false |
| 106 | + uses: allure-framework/allure-action@v0 |
| 107 | + with: |
| 108 | + report-directory: ./out/allure-report |
| 109 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments