diff --git a/.github/workflows/cohesion.yml b/.github/workflows/test_action.yml similarity index 73% rename from .github/workflows/cohesion.yml rename to .github/workflows/test_action.yml index b8581b3..12088d1 100644 --- a/.github/workflows/cohesion.yml +++ b/.github/workflows/test_action.yml @@ -1,4 +1,4 @@ -name: action +name: test_action on: push: @@ -14,13 +14,11 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Swift Package Resolve - run: swift package resolve - - - uses: arthurpalves/coherent-swift@0.5.4.6 + - uses: arthurpalves/coherent-swift@0.5.4.7 with: source: Sources minimum_threshold: 60 ignore_output_result: true + only_changes: true report_format: plain diff --git a/action.yml b/action.yml index 9435697..d3ba32d 100644 --- a/action.yml +++ b/action.yml @@ -33,18 +33,18 @@ runs: - name: Prepare spec shell: bash run: | - echo -e "source: ${{ inputs.source }}\n" > coherent-swift.yml - echo -e "minimum_threshold: ${{ inputs.minimum_threshold }}\n" >> coherent-swift.yml - echo -e "reports_folder: ${{ inputs.reports_folder }}\n" >> coherent-swift.yml - echo -e "ignore_output_result: ${{ inputs.ignore_output_result }}\n" >> coherent-swift.yml - echo -e "report_format: ${{ inputs.report_format }}\n" >> coherent-swift.yml + echo -e "source: ${{ inputs.source }}\n" > ${{ github.action_path }}/_coherent-swift.yml + echo -e "minimum_threshold: ${{ inputs.minimum_threshold }}\n" >> ${{ github.action_path }}/_coherent-swift.yml + echo -e "reports_folder: ${{ inputs.reports_folder }}\n" >> ${{ github.action_path }}/_coherent-swift.yml + echo -e "ignore_output_result: ${{ inputs.ignore_output_result }}\n" >> ${{ github.action_path }}/_coherent-swift.yml + echo -e "report_format: ${{ inputs.report_format }}\n" >> ${{ github.action_path }}/_coherent-swift.yml - name: Measure cohesion shell: bash run: | cd ${{ github.action_path }} - if [[ ${{ inputs.only_changes}} == 'true' ]]; then - swift run coherent-swift report -d -s coherent-swift.yml + if [[ ${{ inputs.only_changes }} == 'true' ]]; then + swift run coherent-swift report -d -s _coherent-swift.yml else - swift run coherent-swift report -s coherent-swift.yml + swift run coherent-swift report -s _coherent-swift.yml fi