Skip to content

Commit 0572308

Browse files
committed
Add Code Climate
1 parent 1d2a0f8 commit 0572308

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

.codeclimate.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
exclude_patterns:
2+
- "**/*.json"
3+
- ".*.json"
4+
- "**/*.yml"
5+
- ".*.yml"
6+
- "**/*.md"
7+
- ".github/"
8+
- ".gitignore"
9+
- "LICENSE"
10+
- "Package*"
11+
- "Tests/"
12+
- "!Sources/"

.github/workflows/build.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build
1+
name: Tests
22

33
on:
44
push:
@@ -16,7 +16,14 @@ jobs:
1616
os: [macos-10.15, ubuntu-16.04, ubuntu-18.04, ubuntu-20.04]
1717
steps:
1818
- uses: actions/checkout@v2
19-
- name: Build
20-
run: swift build --build-tests --enable-test-discovery -c release
21-
- name: Run tests
22-
run: swift test --skip-build --enable-test-discovery -c release
19+
- name: Set code coverage path
20+
run: echo ::set-env name=codecov_path::$(swift test --show-codecov-path)
21+
- name: Test and publish code coverage to Code Climate
22+
uses: paulofaria/codeclimate-action@master
23+
if: matrix.os == 'macos-10.15'
24+
env:
25+
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
26+
with:
27+
downloadUrl: https://github.com/paulofaria/test-reporter/releases/download/0.9.0/test-reporter-0.9.0-darwin-amd64
28+
coverageCommand: swift test --enable-test-discovery --enable-code-coverage
29+
coverageLocations: ${{ env.codecov_path }}:lcov-json

0 commit comments

Comments
 (0)