diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml deleted file mode 100644 index 486351782..000000000 --- a/.github/workflows/sonarcloud.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Sonar -on: - workflow_run: - workflows: [ "Tests" ] - types: - - completed -jobs: - sonar: - name: Sonar - runs-on: ubuntu-latest - if: github.event.workflow_run.conclusion == 'success' - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - # Adapted from https://github.com/matrix-org/matrix-js-sdk/blob/develop/.github/workflows/sonarqube.yml - # There's a 'download artifact' action, but it hasn't been updated for the workflow_run action - # (https://github.com/actions/download-artifact/issues/60) so instead we get this mess: - - name: Download Test Results - uses: actions/github-script@v3.1.0 - with: - script: | - const artifacts = await github.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: ${{ github.event.workflow_run.id }}, - }); - const matchArtifact = artifacts.data.artifacts.filter((artifact) => { - return artifact.name == "test_output" - })[0]; - const download = await github.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: matchArtifact.id, - archive_format: 'zip', - }); - const fs = require('fs'); - fs.writeFileSync('${{github.workspace}}/test_output.zip', Buffer.from(download.data)); - - - name: Extract test tesults - run: unzip -d fastlane/test_output test_output.zip && rm test_output.zip - - - name: SonarCloud scan - uses: SonarSource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e4ae71489..b36f3d725 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,8 +34,5 @@ jobs: - name: Run tests run: bundle exec fastlane tests - - name: Upload Test Results - uses: actions/upload-artifact@v2 - with: - name: test_output - path: fastlane/test_output \ No newline at end of file + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1.2.1 \ No newline at end of file diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 80a123bcf..5443f7f58 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -92,14 +92,6 @@ end lane :tests do run_tests() - - slather( - sonarqube_xml: true, - output_directory: "./fastlane/test_output", - proj: "ElementX.xcodeproj", - scheme: "ElementX", - ) - end desc "Upload IPA to Diawi"