Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 13 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,34 +44,31 @@ jobs:
uses: fwal/setup-swift@v1.8.0
- name: Run tests
run: swift test --enable-code-coverage -Xswiftc -warnings-as-errors
- name: Generate test coverage report
if: ${{ matrix.os == needs.get_os.outputs.coverage_os }}
uses: maxep/spm-lcov-action@0.3.1
with:
output-file: ./coverage/lcov.info
- name: 'Read minimum coverage'
if: ${{ matrix.os == needs.get_os.outputs.coverage_os }}
run: echo "minimum_coverage=$(cat ./.github/minimum_coverage.txt)" >> $GITHUB_ENV
- name: Enforce test coverage threshhold
if: ${{ matrix.os == needs.get_os.outputs.coverage_os }}
uses: VeryGoodOpenSource/very_good_coverage@v1.2.0
with:
path: ./coverage/lcov.info
min_coverage: ${{ env.minimum_coverage }}
- name: Save PR number
if: ${{ matrix.os == needs.get_os.outputs.coverage_os }}
run: |
mkdir -p ./pr
echo ${{ github.event.number }} > ./pr/NR
- name: Move Coverage Report
- name: Generate test coverage report
if: ${{ matrix.os == needs.get_os.outputs.coverage_os }}
run: mv ./coverage/lcov.info ./pr/lcov.info
uses: maxep/spm-lcov-action@0.3.1
with:
output-file: ./pr/lcov.info
- name: Upload Coverage Information for Comment
if: ${{ matrix.os == needs.get_os.outputs.coverage_os }}
uses: actions/upload-artifact@v2
with:
name: pr
path: pr/
- name: 'Read minimum coverage'
if: ${{ matrix.os == needs.get_os.outputs.coverage_os }}
run: echo "minimum_coverage=$(cat ./.github/minimum_coverage.txt)" >> $GITHUB_ENV
- name: Enforce test coverage threshhold
if: ${{ matrix.os == needs.get_os.outputs.coverage_os }}
uses: VeryGoodOpenSource/very_good_coverage@v1.2.0
with:
path: ./pr/lcov.info
min_coverage: ${{ env.minimum_coverage }}

swiftlint:
name: SwiftLint
Expand Down