Skip to content

Commit

Permalink
chore: add coverage configs
Browse files Browse the repository at this point in the history
chore: fix linting issues
  • Loading branch information
Goldziher committed Oct 19, 2023
1 parent c666d90 commit d7b3ed2
Show file tree
Hide file tree
Showing 13 changed files with 544 additions and 512 deletions.
36 changes: 25 additions & 11 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -1,31 +1,45 @@
version = 1

exclude_patterns = [
"gen/**",
"e2e/**",
"sdks/android/test-app/**",
"**/node_modules/",
"js/**/*.js"
]

test_patterns = [
"**/*_test.go",
"**/test/**",
"**/tests/**",
]

[[analyzers]]
name = "kotlin"

[analyzers.meta]
runtime_version = "1.8"
language_version = "1.9"
[analyzers.meta]
runtime_version = "1.8"
language_version = "1.9"

[[analyzers]]
name = "java"

[analyzers.meta]
runtime_version = "17"
[analyzers.meta]
runtime_version = "17"

[[analyzers]]
name = "javascript"

[analyzers.meta]
plugins = ["react"]
environment = [
[analyzers.meta]
plugins = ["react"]
environment = [
"nodejs",
"browser",
"vitest"
]
]

[[analyzers]]
name = "go"

[analyzers.meta]
import_root = "github.com/basemind-ai/monorepo"
[analyzers.meta]
import_root = "github.com/basemind-ai/monorepo"
6 changes: 5 additions & 1 deletion .github/workflows/tests-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ jobs:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Download the DeepSource CLI
run: curl https://deepsource.io/cli | sh
- name: Enable gradlew execution
run: chmod +x gradlew
- name: Test
run: ./gradlew test
run: ./gradlew koverXmlReportRelease
- name: Upload Coverage Report
run: DEEPSOURCE_DSN=${{secrets.DEEPSOURCE_DSN}} ./bin/deepsource report --analyzer test-coverage --key kotlin --value-file sdks/android/sdk/build/reports/kover/reportRelease.xml
6 changes: 5 additions & 1 deletion .github/workflows/tests-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Download the DeepSource CLI
run: curl https://deepsource.io/cli | sh
- name: Load cached Golang dependencies
id: cached-go-dependencies
uses: actions/cache@v3
Expand All @@ -53,4 +55,6 @@ jobs:
workload_identity_provider: projects/${{env.GCP_PROJECT_NUMBER}}/locations/global/workloadIdentityPools/${{env.GCP_WORKLOAD_IDENTITY_POOL}}/providers/${{env.GCP_OIDC_PROVIDER_NAME}}
service_account: ${{env.GCP_SERVICE_ACCOUNT_NAME}}@${{env.GCP_PROJECT_ID}}.iam.gserviceaccount.com
- name: Test
run: go test ./...
run: go test ./... -coverprofile=cover.out
- name: Upload Coverage Report
run: DEEPSOURCE_DSN=${{secrets.DEEPSOURCE_DSN}} ./bin/deepsource report --analyzer test-coverage --key go --value-file ./coverage.out
6 changes: 4 additions & 2 deletions .github/workflows/tests-ts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 20
- name: Download the DeepSource CLI
run: curl https://deepsource.io/cli | sh
- name: Install pnpm
uses: pnpm/action-setup@v2.4.0
id: pnpm-install
Expand All @@ -49,5 +51,5 @@ jobs:
run: pnpm install -r
- name: Test
run: pnpm run test:coverage
- name: Coverage
uses: davelosert/vitest-coverage-report-action@v2
- name: Upload Coverage Report
run: DEEPSOURCE_DSN=${{secrets.DEEPSOURCE_DSN}} ./bin/deepsource report --analyzer test-coverage --key javascript --value-file ./coverage/cobertura-coverage.xml
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ plugins {
alias(libs.plugins.android.library) apply false
alias(libs.plugins.gradle.dependency.update)
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kover)
alias(libs.plugins.spotless)
alias(libs.plugins.version.catalog.update)
}
Expand Down
16 changes: 8 additions & 8 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,21 @@
"zustand": "^4.4.3"
},
"devDependencies": {
"@storybook/addon-essentials": "^7.5.0",
"@storybook/addon-interactions": "^7.5.0",
"@storybook/addon-links": "^7.5.0",
"@storybook/addon-essentials": "^7.5.1",
"@storybook/addon-interactions": "^7.5.1",
"@storybook/addon-links": "^7.5.1",
"@storybook/addon-onboarding": "^1.0.8",
"@storybook/addon-styling": "^1.3.7",
"@storybook/blocks": "^7.5.0",
"@storybook/nextjs": "^7.5.0",
"@storybook/react": "^7.5.0",
"@storybook/blocks": "^7.5.1",
"@storybook/nextjs": "^7.5.1",
"@storybook/react": "^7.5.1",
"@storybook/testing-library": "^0.2.2",
"@svgr/webpack": "^8.1.0",
"@tailwindcss/typography": "^0.5.10",
"@testing-library/dom": "^9.3.3",
"@testing-library/jest-dom": "^6.1.4",
"@testing-library/react": "^14.0.0",
"@types/react": "18.2.29",
"@types/react": "18.2.30",
"@types/react-dom": "18.2.14",
"@types/testing-library__jest-dom": "^6.0.0",
"@vitejs/plugin-react": "^4.1.0",
Expand All @@ -55,7 +55,7 @@
"next-translate-plugin": "^2.6.1",
"postcss": "8.4.31",
"sass": "^1.69.4",
"storybook": "^7.5.0",
"storybook": "^7.5.1",
"storybook-react-intl": "^2.0.3",
"tailwindcss": "3.3.3",
"tailwindcss-elevation": "^2.0.0",
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ require (
)

require (
cloud.google.com/go v0.110.8 // indirect
cloud.google.com/go v0.110.9 // indirect
cloud.google.com/go/compute v1.23.1 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/firestore v1.13.0 // indirect
Expand Down Expand Up @@ -98,7 +98,7 @@ require (
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.14.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/api v0.147.0 // indirect
google.golang.org/api v0.148.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/appengine/v2 v2.0.5 // indirect
google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.110.8 h1:tyNdfIxjzaWctIiLYOTalaLKZ17SI44SKFW26QbOhME=
cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk=
cloud.google.com/go v0.110.9 h1:e7ITSqGFFk4rbz/JFIqZh3G4VEHguhAL4BQcFlWtU68=
cloud.google.com/go v0.110.9/go.mod h1:rpxevX/0Lqvlbc88b7Sc1SPNdyK1riNBTUU6JXhYNpM=
cloud.google.com/go/compute v1.23.1 h1:V97tBoDaZHb6leicZ1G6DLK2BAaZLJ/7+9BB/En3hR0=
cloud.google.com/go/compute v1.23.1/go.mod h1:CqB3xpmPKKt3OJpW2ndFIXnA9A4xAy/F3Xp1ixncW78=
cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
Expand Down Expand Up @@ -39,8 +41,6 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/containerd/continuity v0.4.2 h1:v3y/4Yz5jwnvqPKJJ+7Wf93fyWoCB3F5EclWG023MDM=
github.com/containerd/continuity v0.4.2/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ=
github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8=
github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ=
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
Expand Down Expand Up @@ -414,6 +414,8 @@ golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSm
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90=
google.golang.org/api v0.147.0 h1:Can3FaQo9LlVqxJCodNmeZW/ib3/qKAY3rFeXiHo5gc=
google.golang.org/api v0.147.0/go.mod h1:pQ/9j83DcmPd/5C9e2nFOdjjNkDZ1G+zkbK2uvdkJMs=
google.golang.org/api v0.148.0 h1:HBq4TZlN4/1pNcu0geJZ/Q50vIwIXT532UIMYoo0vOs=
google.golang.org/api v0.148.0/go.mod h1:8/TBgwaKjfqTdacOJrOv2+2Q6fBDU1uHKK06oGSkxzU=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
Expand Down
2 changes: 2 additions & 0 deletions go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,8 @@ google.golang.org/genproto/googleapis/bytestream v0.0.0-20230920204549-e6e6cdab5
google.golang.org/genproto/googleapis/bytestream v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:qDbnxtViX5J6CvFbxeNUSzKgVlDLJ/6L+caxye9+Flo=
google.golang.org/genproto/googleapis/bytestream v0.0.0-20231009173412-8bfb1ae86b6c h1:9tZedXBlwql0v/dLZx1E4Rcz9ESc8j1KZk71903wKEg=
google.golang.org/genproto/googleapis/bytestream v0.0.0-20231009173412-8bfb1ae86b6c/go.mod h1:itlFWGBbEyD32PUeJsTG8h8Wz7iJXfVK4gt1EJ+pAG0=
google.golang.org/genproto/googleapis/bytestream v0.0.0-20231012201019-e917dd12ba7a h1:ptblGJZY+SBRhJRVneg4DiHYKwjgeHedTzrgk8CH7m4=
google.golang.org/genproto/googleapis/bytestream v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:+34luvCflYKiKylNwGJfn9cFBbcL/WrkciMmDmsTQ/A=
gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8=
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc h1:/hemPrYIhOhy8zYrNj+069zDB68us2sMGsfkFJO0iZs=
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ grpcKotlin = "1.4.0"
junitJupiter = "5.10.0"
kotlin = "1.9.10"
kotlinX = "1.7.3"
koverPlugin = "0.7.4"
lifecycleRuntimeKtx = "2.6.2"
marerialThree = "1.2.0-alpha09"
protobuf = "3.24.3"
Expand Down Expand Up @@ -57,6 +58,7 @@ android-junit-jupiter = { id = "de.mannodermaus.android-junit5", version.ref = "
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
gradle-dependency-update = { id = "com.github.ben-manes.versions", version.ref = "dependencyUpdatePlugin" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "koverPlugin" }
protobuf = { id = "com.google.protobuf", version.ref = "protobufPlugin" }
spotless = { id = "com.diffplug.spotless", version.ref = "spotlessPlugin" }
version-catalog-update = { id = "nl.littlerobots.version-catalog-update", version.ref = "versionCatalogUpdatePlugin" }
Loading

0 comments on commit d7b3ed2

Please sign in to comment.