mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 21:39:12 +00:00
Add Codecov upload step. Remove SonarCloud one, will replace by fastlane plugin.
This commit is contained in:
parent
ad9b13aba8
commit
864809c831
48
.github/workflows/sonarcloud.yml
vendored
48
.github/workflows/sonarcloud.yml
vendored
@ -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 }}
|
7
.github/workflows/tests.yml
vendored
7
.github/workflows/tests.yml
vendored
@ -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
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v1.2.1
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user