From aaaa3a1f80901dcdd033a3b9177038172638084a Mon Sep 17 00:00:00 2001 From: Henrique Martins Date: Wed, 27 Oct 2021 03:43:25 -0300 Subject: [PATCH] fga-eps-mds/2021.1-Oraculo#123 Pushing test file --- .github/workflows/release.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 83bb036..c4a6f86 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,14 +13,14 @@ jobs: with: # Disabling shallow clone is recommended for improving relevancy of reporting fetch-depth: 0 - - - name: Run tests - run: sudo docker-compose run frontend bash -c "yarn && yarn test --coverage --watchAll=false" - + - name: Get Date id: date run: echo "::set-output name=date::$(date +'%m-%d-%Y-%H-%M')" + - name: Run tests + run: sudo docker-compose run frontend bash -c "yarn && yarn test --coverage --outputFile=fga-eps-mds-2021_1-Oraculo-FrontEnd-${{ steps.date.outputs.date }}-test.json --json --watchAll=false" + - name: Create JSON run: curl -X POST 'https://sonarcloud.io/api/measures/component_tree?component=fga-eps-mds_2021-1-PC-GO-Frontend&metricKeys=files,functions,complexity,comment_lines_density,duplicated_lines_density,coverage,ncloc,security_rating,tests,test_success_density,test_execution_time,reliability_rating&ps=500' > fga-eps-mds-2021_1-Oraculo-FrontEnd-${{ steps.date.outputs.date }}.json @@ -44,3 +44,16 @@ jobs: user_email: ${{ secrets.USER_EMAIL }} user_name: ${{ secrets.USER_NAME }} commit_message: "Adding SonarCloud file - fga-eps-mds-2021_1-Oraculo-FrontEnd-${{ steps.date.outputs.date }}.json" + + - name: Pushes test file + uses: dmnemec/copy_file_to_another_repo_action@main + env: + API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} + with: + source_file: fga-eps-mds-2021_1-Oraculo-FrontEnd-${{ steps.date.outputs.date }}-test.json + destination_repo: "fga-eps-mds/2021.1-Oraculo" + destination_branch: "master" + destination_folder: "analytics-raw-data" + user_email: ${{ secrets.USER_EMAIL }} + user_name: ${{ secrets.USER_NAME }} + commit_message: "Adding test file - fga-eps-mds-2021_1-Oraculo-FrontEnd-${{ steps.date.outputs.date }}-test.json"