Skip to content

Commit

Permalink
chore(ci): adds coverage report for provider proxy (#789)
Browse files Browse the repository at this point in the history
  • Loading branch information
stalniy authored Feb 5, 2025
1 parent 3aa21f1 commit 99721aa
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/docker-build-provider-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,18 @@ jobs:
if: steps.filter.outputs.provider-proxy == 'true'
run: npm run lint -w apps/provider-proxy

- name: Run unit tests
- name: Run tests
if: steps.filter.outputs.provider-proxy == 'true'
run: npm run test:unit --workspace=apps/provider-proxy

- name: Run functional tests
if: steps.filter.outputs.provider-proxy == 'true'
run: npm run test:functional --workspace=apps/provider-proxy
run: npm run test:cov --workspace=apps/provider-proxy

- name: Build the Docker image
if: steps.filter.outputs.provider-proxy == 'true'
run: packages/docker/script/dc.sh build provider-proxy

- name: Upload Test Coverage
if: steps.filter.outputs.provider-proxy == 'true'
uses: codecov/codecov-action@v5
with:
directory: ./apps/provider-proxy/coverage
flags: provider-proxy
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/validate-n-build-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
run: packages/docker/script/dc.sh build api

- name: Upload Test Coverage
if: steps.filter.outputs.api == 'true'
uses: codecov/codecov-action@v5
with:
directory: ./apps/api/coverage
Expand Down
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,10 @@ if [[ "$CI" != "true" ]]; then
npm run generate -w packages/net
git add ./packages/net/src/generated

echo ""
echo "Checking if package-lock.json and package.json are in sync..."
echo ""
npm ci --dry-run --ignore-scripts > /dev/null

npx lint-staged
fi
1 change: 1 addition & 0 deletions apps/provider-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"prod": "node ./dist/server.js",
"release": "release-it",
"start": "npm run build && node ./dist/server.js",
"test:cov": "jest --selectProjects unit functional --coverage",
"test:functional": "jest --selectProjects functional",
"test:functional:cov": "jest --selectProjects functional --coverage",
"test:functional:watch": "jest --selectProjects functional --watch",
Expand Down
5 changes: 3 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 99721aa

Please sign in to comment.