Skip to content

Commit

Permalink
ci(workflows): update badge
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuagraber committed Mar 8, 2024
1 parent 23211e4 commit 6be7cb2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yaml
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Build
run: npm run build
- name: Test
run: npm run test
run: npm run test:badge

# Only run the coverage once
- name: Get Coverage for badge
Expand All @@ -44,7 +44,7 @@ jobs:
# ];
# SUMMARY = SUMMARY.split('\n')[5]; // 'Lines : 31.93% ( 38/119 )'
# SUMMARY = SUMMARY.split(':')[1].split('(')[0].trim(); // '31.93%'
SUMMARY="$(npm run test | tail -2 | head -1)"
SUMMARY="$(npm run test:badge | tail -2 | head -1)"
TOKENS=($SUMMARY)
# process.env.COVERAGE = '31.93%';
echo "COVERAGE=$(echo ${TOKENS[2]})" >> $GITHUB_ENV
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -112,6 +112,7 @@
"prepare": "husky install",
"test": "vitest --dom --run --coverage",
"test:changed": "npm run test -- --changed",
"test:badge": "vitest run --coverage.enabled --coverage.reporter='text-summary'",
"test:ci": "npm run test -- --silent",
"typecheck": "vue-tsc",
"badges": "run-p badges:*",
Expand Down

0 comments on commit 6be7cb2

Please sign in to comment.