File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 1919 - uses : actions/checkout@v1
2020 - run : swift test --enable-code-coverage
2121 - uses : ./
22+ name : Run swifty-code-coverage
2223 with :
2324 build-path : .build
2425 target : SamplePackageTests.xctest
Original file line number Diff line number Diff line change @@ -32,13 +32,18 @@ runs:
3232 using : " composite"
3333 steps :
3434 - if : runner.os == 'Linux'
35+ name : Generate coverage file (Linux)
3536 run : |
36- brew install llvm
37+ eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" && \
38+ brew install llvm && \
39+ PATH="$PATH:$(brew --prefix llvm)/bin" && \
40+ sh $GITHUB_ACTION_PATH/lcov.sh --build-path "${{ inputs.build-path }}" --target "${{ inputs.target }}" --is-spm "${{ inputs.is-spm }}" --ignore-filename-regex "${{ inputs.ignore-filename-regex }}" --output "${{ inputs.output }}" | tee coverage.txt
3741 shell : bash
3842
39- - name : Generate lcov file
43+ - if : runner.os == 'macOS'
44+ name : Generate coverage file (macOS)
4045 run : |
41- sh $GITHUB_ACTION_PATH/lcov.sh --build-path "${{ inputs.build-path }}" --target "${{ inputs.target }}" --is-spm "${{ inputs.is-spm }}" --ignore-filename-regex "${{ inputs.ignore-filename-regex }}" --output "${{ inputs.output }}"
46+ sh $GITHUB_ACTION_PATH/lcov.sh --build-path "${{ inputs.build-path }}" --target "${{ inputs.target }}" --is-spm "${{ inputs.is-spm }}" --ignore-filename-regex "${{ inputs.ignore-filename-regex }}" --output "${{ inputs.output }}" | tee coverage.txt
4247 shell : bash
4348
4449 - name : Archive the code coverage file (lcov)
4853 name : ${{ inputs.output-artifact-name }}
4954 path : |
5055 ${{ inputs.output }}
56+
57+ - name : Archive the code coverage file (textfile)
58+ if : always()
59+ uses : actions/upload-artifact@v3
60+ with :
61+ name : coverage-textfile
62+ path : |
63+ coverage.txt
You can’t perform that action at this time.
0 commit comments