style: lint financial-service-e2e #142
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint and Test | |
on: | |
push: | |
branches: | |
- "milestone-**" | |
- "issue-**" | |
pull_request: | |
branches: | |
- "milestone-**" | |
- development | |
- main | |
jobs: | |
unit-testing: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [21.6.1] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
- run: npm ci --force | |
- name: Lint auth-service | |
run: npx nx lint auth-service | |
- name: Lint financial-service | |
run: npx nx lint financial-service | |
- name: Lint shared code | |
run: npx nx lint shared | |
- name: Lint financial-service-e2e | |
run: npx nx lint financial-service-e2e | |
- name: Lint auth-service-e2e | |
run: npx nx lint auth-service-e2e | |
- name: Test auth-service | |
run: npx nx test auth-service -- --coverage --coverageReporters=cobertura | |
- name: Test financial-service | |
run: npx nx test financial-service -- --coverage --coverageReporters=cobertura | |
- name: Test shared code | |
run: npx nx test shared -- --coverage --coverageReporters=cobertura | |
- name: Coverage report for shared code | |
uses: irongut/CodeCoverageSummary@v1.3.0 | |
if: github.event_name == 'pull_request' | |
with: | |
filename: coverage/shared/cobertura-coverage.xml | |
badge: true | |
fail_below_min: false | |
format: markdown | |
hide_branch_rate: false | |
hide_complexity: true | |
indicators: true | |
output: both | |
thresholds: "80 90" | |
- name: Rename report file for shared code | |
if: github.event_name == 'pull_request' | |
run: mv code-coverage-results.md code-coverage-results-shared.md | |
- name: Coverage report for auth-service | |
uses: irongut/CodeCoverageSummary@v1.3.0 | |
if: github.event_name == 'pull_request' | |
with: | |
filename: coverage/apps/auth-service/cobertura-coverage.xml | |
badge: true | |
fail_below_min: false | |
format: markdown | |
hide_branch_rate: false | |
hide_complexity: true | |
indicators: true | |
output: both | |
thresholds: "80 90" | |
- name: Rename report file for auth-service | |
if: github.event_name == 'pull_request' | |
run: mv code-coverage-results.md code-coverage-results-auth-service.md | |
- name: Coverage report for financial-service | |
uses: irongut/CodeCoverageSummary@v1.3.0 | |
if: github.event_name == 'pull_request' | |
with: | |
filename: coverage/apps/financial-service/cobertura-coverage.xml | |
badge: true | |
fail_below_min: false | |
format: markdown | |
hide_branch_rate: false | |
hide_complexity: true | |
indicators: true | |
output: both | |
thresholds: "80 90" | |
- name: Set title for shared code | |
if: github.event_name == 'pull_request' | |
run: | | |
cat <<EOF >> code-coverage-output.md | |
## 📦 Shared | |
EOF | |
- name: Merge report files | |
if: github.event_name == 'pull_request' | |
run: cat code-coverage-results-shared.md >> code-coverage-output.md | |
- name: Set title for auth-service | |
if: github.event_name == 'pull_request' | |
run: | | |
cat <<EOF >> code-coverage-output.md | |
## 📦 Auth Service | |
EOF | |
- name: Merge report files | |
if: github.event_name == 'pull_request' | |
run: cat code-coverage-results-auth-service.md >> code-coverage-output.md | |
- name: Set title for financial-service | |
if: github.event_name == 'pull_request' | |
run: | | |
cat <<EOF >> code-coverage-output.md | |
## 📦 Financial Service | |
EOF | |
- name: Merge report files | |
if: github.event_name == 'pull_request' | |
run: cat code-coverage-results.md >> code-coverage-output.md | |
- name: Set final PR message | |
if: github.event_name == 'pull_request' | |
run: | | |
cat <<EOF >> code-coverage-output.md | |
⛔️ This comment can be replaced by Github Actions. Do not quote or react to it. | |
EOF | |
- name: Add Coverage PR comment | |
uses: marocchino/sticky-pull-request-comment@v2 | |
if: github.event_name == 'pull_request' | |
with: | |
header: code-coverage | |
recreate: true | |
path: code-coverage-output.md |