Skip to content

Commit

Permalink
right, switch coverage gen order to have branch checked out second.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpolzin committed Feb 1, 2021
1 parent 180ff3f commit c18cbb3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- run: apt-get update && apt-get install -y gtk+-3.0 libgtk+-3.0
- name: Checkout Branch
uses: actions/checkout@v2
- name: Build Test Target
run: swift build --enable-test-discovery -Xswiftc -profile-coverage-mapping -Xswiftc -profile-generate --product TokamakPackageTests
- name: Run Tests
run: swift test --enable-test-discovery --enable-code-coverage --skip-build
- name: Generate Branch Coverage Report
uses: mattpolzin/swift-codecov-action@0.6.1
id: cov
with:
MINIMUM_COVERAGE: 20
- name: Store Branch Report
run: cp ./codecov.txt ../codecov-b.txt
if: ${{ always() }}
- name: Checkout Main
if: ${{ always() }}
uses: actions/checkout@v2
Expand All @@ -41,9 +27,23 @@ jobs:
- name: Generate Main Coverage Report
if: ${{ always() }}
uses: mattpolzin/swift-codecov-action@0.6.1
- name: Store Main Report
run: cp ./codecov.txt ../codecov-main.txt
if: ${{ always() }}
- name: Checkout Branch
uses: actions/checkout@v2
- name: Build Test Target
run: swift build --enable-test-discovery -Xswiftc -profile-coverage-mapping -Xswiftc -profile-generate --product TokamakPackageTests
- name: Run Tests
run: swift test --enable-test-discovery --enable-code-coverage --skip-build
- name: Generate Branch Coverage Report
uses: mattpolzin/swift-codecov-action@0.6.1
id: cov
with:
MINIMUM_COVERAGE: 20
- name: Diff Test Coverage
shell: bash
run: pwd
run: ./cov_diff.sh
id: covdiff
if: ${{ always() }}
- name: Find Comment
Expand Down
2 changes: 1 addition & 1 deletion cov_diff.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

diff_cov_output="$(diff ./codecov.txt ../codecov-b.txt)"
diff_cov_output="$(diff ../codecov-main.txt ./codecov.txt)"
diff_cov_output="${diff_cov_output//'%'/'%25'}"
diff_cov_output="${diff_cov_output//$'\n'/'%0A'}"
diff_cov_output="${diff_cov_output//$'\r'/'%0D'}"
Expand Down

0 comments on commit c18cbb3

Please sign in to comment.