From 6058a1905dab616758a30ca27fbadd5cd208dd1c Mon Sep 17 00:00:00 2001 From: Ivan Maximov Date: Wed, 3 Feb 2021 01:14:55 +0300 Subject: [PATCH 1/3] Migrate to codecov --- .github/workflows/test.yml | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a7402993..03522cc9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ on: paths: - src/** - .github/workflows/** - # save code coverage reports when PRs are merged + # Upload code coverage results when PRs are merged push: branches: - master @@ -62,24 +62,12 @@ jobs: run: dotnet build --no-restore -c Debug - name: Test solution [Debug] working-directory: src - run: dotnet test --no-restore -p:CollectCoverage=true -p:CoverletOutputFormat=lcov -p:Include=[GraphQL-Parser]* -p:CoverletOutput=../../${{ matrix.os }}.lcov.info - - name: Upload coverage to Coveralls # https://github.com/marketplace/actions/coveralls-github-action + run: dotnet test --no-restore -p:CollectCoverage=true -p:CoverletOutputFormat=opencover -p:CoverletOutput=../.coverage/$(AssemblyName)/ + - name: Upload coverage to codecov if: ${{ startsWith(matrix.os, 'ubuntu') }} - uses: coverallsapp/github-action@v1.1.2 + uses: codecov/codecov-action@v1.2.1 with: - github-token: ${{secrets.GITHUB_TOKEN }} - path-to-lcov: ${{ matrix.os }}.lcov.net5.info # net5 only, ignore netcoreapp3.1 - parallel: true - flag-name: ${{ matrix.os }} - finish: - needs: test - runs-on: ubuntu-latest - steps: - - name: Coveralls Finished - uses: coverallsapp/github-action@v1.1.2 - with: - github-token: ${{ secrets.github_token }} - parallel-finished: true + files: .coverage/GraphQL-Parser/coverage.net5.opencover.xml buildcheck: needs: From 929cc5ee00ebbf0102b22a73c9056df08dbb2278 Mon Sep 17 00:00:00 2001 From: Ivan Maximov Date: Wed, 3 Feb 2021 01:20:45 +0300 Subject: [PATCH 2/3] fix --- .github/workflows/test.yml | 2 +- src/Directory.Build.targets | 8 ++++++++ src/GraphQLParser.sln | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 src/Directory.Build.targets diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 03522cc9..64571cc1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -62,7 +62,7 @@ jobs: run: dotnet build --no-restore -c Debug - name: Test solution [Debug] working-directory: src - run: dotnet test --no-restore -p:CollectCoverage=true -p:CoverletOutputFormat=opencover -p:CoverletOutput=../.coverage/$(AssemblyName)/ + run: dotnet test --no-restore -p:CollectCoverage=true - name: Upload coverage to codecov if: ${{ startsWith(matrix.os, 'ubuntu') }} uses: codecov/codecov-action@v1.2.1 diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets new file mode 100644 index 00000000..6535dc36 --- /dev/null +++ b/src/Directory.Build.targets @@ -0,0 +1,8 @@ + + + + opencover + $(MSBuildThisFileDirectory)../.coverage/$(AssemblyName)/ + + + diff --git a/src/GraphQLParser.sln b/src/GraphQLParser.sln index 58f41669..345681ed 100644 --- a/src/GraphQLParser.sln +++ b/src/GraphQLParser.sln @@ -14,6 +14,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ..\.editorconfig = ..\.editorconfig ..\.gitignore = ..\.gitignore Directory.Build.props = Directory.Build.props + Directory.Build.targets = Directory.Build.targets ..\LICENSE.md = ..\LICENSE.md ..\assets\logo.64x64.png = ..\assets\logo.64x64.png ..\README.md = ..\README.md From 068974acf85b0e1329ff20963b802a4149ec6ddf Mon Sep 17 00:00:00 2001 From: Ivan Maximov Date: Wed, 3 Feb 2021 01:24:29 +0300 Subject: [PATCH 3/3] 1 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 64571cc1..65fbe19e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -67,7 +67,7 @@ jobs: if: ${{ startsWith(matrix.os, 'ubuntu') }} uses: codecov/codecov-action@v1.2.1 with: - files: .coverage/GraphQL-Parser/coverage.net5.opencover.xml + files: .coverage/GraphQLParser.Tests/coverage.net5.opencover.xml buildcheck: needs: